In a browser, is it best to use one huge spritesheet or many (10000) different PNG's?

Posted by Nick on Game Development See other posts from Game Development or by Nick
Published on 2011-11-02T17:45:41Z Indexed on 2012/12/19 17:15 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

I'm creating a game in jQuery, where I use about 10000 32x32 tiles. Until now, I have been using them all separately (no sprite sheet). An average map uses about 2000 tiles (sometimes re-used PNG's but all separate divs) and the performance ranges from stable (Chrome) to a bit laggy (Firefox). Each of these divs are positioned absolutely using CSS. They do not need to be updated every tick, just when a new map is loaded.

Would it be better for performance to use spritesheet methods for the divs using CSS background-positioning, like gameQuery does?

Thank you in advance!

© Game Development or respective owner

Related posts about JavaScript

Related posts about sprites