2D Toolkit Forum

2D Toolkit => FAQs => Topic started by: unikronsoftware on January 26, 2012, 07:06:17 pm

Title: I have a frame rate spike when I instantiate a large number of sprites. What can
Post by: unikronsoftware on January 26, 2012, 07:06:17 pm
The mesh on each sprite is built up at runtime. This means that even thought the data is very optimal and very few transformations are actually performed on this data, there is still a performance hit doing this. In order to get around this problem, you should preallocate and pool your objects at the start of the game. This is generally a good idea on mobile platforms to avoid allocations and garbage collections even when not using this system.