Instance Management

Feb 14, 2012 at 3:23 AM

So I've successfully created about 50000 blocks through instancing and have a 'Profile' build framerate of about 80 FPS. As the user moves around, I want to remove some of the instances and add new ones. How do I go about removing previously created instances?

Feb 14, 2012 at 9:28 AM

Hi SpoonsJTD,

I have a workitem on this topic on my todolist as you can see here:

I'll work on it asap.


Feb 14, 2012 at 1:19 PM

Excellent, thanks!

Feb 16, 2012 at 4:22 PM

I do this by maintaing a pool of instance entities - populate it with the maximum number of simultaneous entities with their transform scale set to 0.

from then on to create an instance grab one from the pool and scale/position it where you want - when an entity dies just set it's instance transform scale to 0 and return it to the pool.

This wouldn't really work in the context of a cubeworld, however as discussed on another thread instancing is probably not the best technique to use in this case and you should probably just break your world up into chunks and create a mesh for each chunk.