I'm doing some (hopefully) final tweaks on my project, but in trying to optimize it as best as possible for all platforms (basically PC and mobile), I've run into a conundrum.
I need to be able to continuously create enemies on screen, for the player to destroy, but also destroy any unused enemies, when they wander off screen, take relieve memory.
Here's an example of how I set it up.
I use the "NObjects < xx" to prevent entire clusters of these guys from forming on screen. But that creates a problem, if more of them wander off than the player is able to destroy. I need to constantly create enemies until the score reaches a certain number. Setting the limit too high, creates more enemies than is needed, and creating too little, causes the all activity to cease before the the desired score is reached.
I'm possibly overthinking it, but I've wracking my brain for days trying to figure this out.
TL; DR Need to constantly create objects without slowing down the game too much.