How many sprites is too many?

Discussion and feedback on Construct 2

Post » Mon Feb 24, 2014 6:28 pm

I realise this is kind of a "how long is a piece of string" question, but what's a good upper limit to have for the number of sprites in a layout?

As a bit of background on this, I'm working on a tile-based mining game. At first I was generating every tile sprite individually, which meant I was starting every layout with around 7,500 16x16 sprites from the get-go. I've since switched to using the TileMap object and the framerate gain has been phenomenal, but it's got me thinking about more ways to improve efficiency.

For instance, I have a black "darkness" layer above my main layer, and I was generating a Destinationout "lightwindow" sprite every time the player mines a tile, so that only the area that's been mined out is illuminated. These lightwindow sprites mount up after a while and start impacting framerate, so I started using Rojohound's very excellent Canvas plugin, pasting the lightwindow to the canvas and destroying it on creation. This works nicely, but a one problem is that pasting to canvas causes a very slight stutter, so the compromise I'm considering is to let the lightwindow sprites mount up until they start having an effect on framerate, then pasting & destroying them all at once - this way the stutter only occurs occasionally.

Anyhoo, with this in mind, how many sprites is too many? I realise all systems are different and games will always run less well on less capable machines, but are there any good rules of thumb for this?
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Tue Feb 25, 2014 12:52 am

Id say that there's really only one rule. Testing, Testing and more Testing.
B
16
S
4
G
2
Posts: 233
Reputation: 2,560

Post » Tue Feb 25, 2014 1:00 am

Have a targeted device or SoC performance level you want your game to run well on first and foremost. Then work based on that. At some point there has to be a cut-off where devices with weaker SoCs are just not going to handle it well, its up to you what you want the cut-off point to be.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Tue Feb 25, 2014 11:07 pm

Guess I'd better get testing then, thanks for replying!
B
15
S
4
G
1
Posts: 286
Reputation: 1,988


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests