How many sprites is too many?

0 favourites
  • 4 posts
From the Asset Store
Build your map with these isometric objects and terrains
  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Id say that there's really only one rule. Testing, Testing and more Testing.

  • 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.

  • Guess I'd better get testing then, thanks for replying!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)