i noticed that after ending a stage the enemies doesnt despawn after playing a while, i saw some of the enemies already having low hp offscreen when im only using melee heroes instead of having full hp causing the game to slow down
maybe slip in clear all enemy when exit button is pressed or a enemy spawn/despawn range limit or some lag optimizations