In my game I create a lot of enemy waves and move them with transition.to along a path.
The enemy numbers can get really huge… something like 100 waves * 20 enemies. Each enemy then moves on the path from point to point where it changes it’s direction (which is a new transition to a new position).
I completely cancel the transitions when they reach a goal or an enemy is destroyed. I also remove all enemy graphics.
BUT: I still have performance issues when the wave count goes above 60! I have no idea why this is happening.
Do you have some suggestions, idea for what can cause this? A memory check shows the graphics are destroyed correctly it seems during gameplay.
Is there anything else to look into?
Thanks for your help!
UPDATE: I now have checked the used system memory a little bit closer and in the later waves and it seems it is getting too big. It starts with 20 MB and counts up, then falls back to nearly 20 MB … but it later grows and counts up to over 60 MB when the lags are starting a lot and then only falls back to 32 MB to start growing beyond 64 MB.
How can I keep the system memory usage low and what can cause this to grow so much?

