In a browser, is it best to use one huge spritesheet or many (10000) different PNG's?
- by Nick
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!