Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Simple Tier 1 vs. Tier 2 sprite benchmark. Surprising.

Author
Message
GTRON
5
Years of Service
User Offline
Joined: 30th Jan 2019
Location: Netherlands
Posted: 27th Feb 2019 14:47
Hi All,

I've just started developing in AppGameKit and my burning question has been - how much faster is Tier 2 than Tier 1 (for something simple like a particle simulation with sprites).

The answer was surprising to me in many ways.

Test Platform:
Intel i7-6700l
NVidia GTX 1080
Windows 10 Latest Update / Latest NVidia Drivers 419.17.
3840x2160 Philips Display

Simple Test:
Move as many 8x8 sprites as possible keeping FPS at 59.9. Bounce sprites at edge of screen.

Result:
Tier 1: Approx 20,000 sprites
Tier 2: Approx 23,000 sprites

So there doesn't seem like much of a difference. However this test created more questions.

I could run both the Tier 1 & Tier 2 text executables simulateously and get the same performance from both.

Opening the task manager showed that both were using appoximately 15% CPU and 14% GPU.

Are the test applications being throttled somehow?

--------------------------

AGK Code


C++ Code
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 27th Feb 2019 18:47 Edited at: 27th Feb 2019 18:53
Throttling: no, not likely.

Sprites will not be terribly demanding on the gpu, particularly if this is really just 1 sprite cloned over and over again, you will mainly be limited by cpu in this case and keeping in mind agk is single thread/ single core only that cpu % seems about right for a quad core cpu
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
GTRON
5
Years of Service
User Offline
Joined: 30th Jan 2019
Location: Netherlands
Posted: 28th Feb 2019 10:32
Of course you're right about AppGameKit using only one core! (slaps forehead).

I found it curious that Tier 2 was only marginally faster than Tier 1 in this scenario.

Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 28th Feb 2019 11:09 Edited at: 28th Feb 2019 11:20
In your C version of the code you call

agk::SetSyncRate(60,0);

which could throttle the speed of the app

SetSyncRate() documentation wrote: "Sets the desired rate that frames will be drawn to the screen, in frames per second (fps). Additionally there are two modes to choose from that can limit the CPU, the first (mode=0) sleeps the application between frames to save CPU and battery life where possible."


it should probably be agk::SetSyncRate(0,0); to make the test fair. As has been said above though, for simple sprite example like this there may not be much difference anyway.
MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 28th Feb 2019 12:43
You will only see speed improvements for your logic code, not for rendering. Both versions call the same api which is very performant anyway.
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 13th Mar 2019 18:31
Quote: "particularly if this is really just 1 sprite cloned over and over again"

I am making a game with a lot of decals, like bullet holes and debris and the likes. At first I rendered them all to an image, but this proved a problem on differing resolutions. Now I create a lot of sprites, but this slows the system down over time when creating more and more sprites. I've found this thread and tried cloning sprites, but the game still slows down. On my system it starts at around 2.000fps, but towards the end of the game it is down to a few hundreds, not a problem for me, but my friend's computer starts at 90-110fps, and it quickly goes below the desired 60fps. Is there any smart way of having loads of decals and no slow down?
13/0
Amon
9
Years of Service
User Offline
Joined: 30th May 2014
Location: Shropshire, United Kingdom
Posted: 13th Mar 2019 19:54
@Cybermind

Are all the decal sprites part of an atlas or are they individual sprite images that you load?

If you have them as part of an atlas image it reduces the draw calls needed by the gpu. You could have lots of different images on one sprite atlas resulting in the gpu only needing to access that once instead of accessing lots of individual images.
Imaginations' greatest gift is the knowledge you supply it.
2D Analyst
AGK Developer
19
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 14th Mar 2019 23:56
I guessed this means for simple type of games there’s really no performance difference. The performance differs when there are large numbers of sprites on screen at once?

Did anyone did a benchmark test with sound effects between tier 1 vs tier 2?
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 15th Mar 2019 22:04
They both use the same graphics engine so tier 2 has no real graphical performance advantage.

Tier 2 has advantage in logic and computation as well as language structures like pointers, oop, and more available libraries
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.

Login to post a reply

Server time is: 2024-03-29 15:34:24
Your offset time is: 2024-03-29 15:34:24