Hey so I'm creating a procedural platformer and I don't have much time to test this so I'll ask here
Say I have a PlatformManager to automatically create and destroy platforms in the game world. Would it be more efficient to, when a platform is destroyed, add it to a 'destroyedPlatforms' list and then when creating a new platform just take one of the destroyed platforms and modify its properties to become a new platform, or should I just create a new platform object every time I need a platform and destroy platforms when they are destroyed (let garbage collection clean them up)? In essence I'm asking if its would be more efficient to reuse and modify an old object or simply create a new one?
Also on a side note, would it be a good idea to make the PlatformManager object an extended Phaser.Group object? (I'm using typescript for this project)
PS: If this doesn't relate to Phaser specifically feel free to move this thread