I’ve started on a new project in which the level geometry is instantiated randomly/procedurally.
Objects are created beyond camera view and when they pass behind the player they are destroyed.
On the iPhone the game starts smoothly at around 40fps but there is a gradual slow down. After two minutes the scene is really chugging.
I’m wondering what is causing the deterioration in speed? I’ve double checked that every clone is getting destroyed once out of sight and the game reaches a maximum of about 60 objects and handles this fine initially.
Could this be something to do with instatiate and destroy on a constant basis? In my previous game, Surveillant I used these functions only occasionally.