I've developed an HTML5 game which is really simple in theory.
Players look (Next Room button) through a number of rooms containing shelves filled with various sprite objects. Clicking on one brings the player back to the "Canvas" room, where they can drag and arrange the objects.
The difficulty is that I have hundreds of sprites filling the shelves - reducing this number is simply not an option. I have the sprites contained in each room
assigned to a texture sheet for that room and upon leaving each room, I use draw_texture_flush() to free up space. This is fine and makes scrolling through the rooms smooth and fast. However it's not so straightforward when the user has selected many objects from
a number of different rooms to place in the Canvas Room, since now there are many different texture sheets open in memory.
I have already replaced all non essential objects with tiles and backgrounds and changed the room
speed to a mere 20. Does anyone have any other suggestions for speeding things up?
Many thanks
Lag with large number of sprites
Started by summerjets, Aug 09 2012 09:44 AM
1 reply to this topic
#1
Posted 09 August 2012 - 09:44 AM
#2
Posted 10 August 2012 - 12:22 PM
I found that running in WebGL mode allows for a vastly increased number of sprites and objects, with no slowdown, though this comes at the cost of IE incompatibility. Initially it was my intention to support IE, but given the low adoption rate of IE9 even amongst IE users, it was no great loss compared to the greater headroom of WebGL.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











