Hello Guest

Author Topic: I have a frame rate spike when I instantiate a large number of sprites. What can  (Read 3960 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9707
    • View Profile
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.