Instance Management

Feb 14, 2012 at 4: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?

Coordinator
Feb 14, 2012 at 10:28 AM

Hi SpoonsJTD,

I have a workitem on this topic on my todolist as you can see here: http://igf.codeplex.com/workitem/331

I'll work on it asap.

Regards

Feb 14, 2012 at 2:19 PM

Excellent, thanks!

Feb 16, 2012 at 5: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.