Reputation: 8655
I'm creating a level modifying slightly the destructible terrain class from here:
http://napephys.com/samples.html#swf-DestructibleTerrain
Instead of using PerlinNoise to create a random map, I input my own bitmapdata. When the size of the terrain is the size of the stage, the performance is just fine, however when I put there a 4096x4096 custom bitmap, I get less than 25 fps, which is expected since it has a lot more of area to calculate.
I assume this has a workaround/best practice, like putting to sleep the area of the level you don't see, maybe passing a AABB region of the space that shouldn't count towards calculation for example, but no idea, I'm guesstimating.
If anyone knows what would be a good approach, let me know, thanks.
Upvotes: 1
Views: 42