
Pooling and limiting the number of voxels helped drastically, although this meant we would need to be careful how often we used voxel destruction. So we had to optimize the best we could and started pooling our voxel prefabs so they wouldn't be destroyed and instantiated over and over again. This isn't surprising considering each voxel is instantiated with it's own physics. Performance started becoming an issue as we started destroying larger objects. The camera was changed to be an overhead isometric type of view, which is more appropriate for the strategy/puzzle-y game we had in mind. I added actual movement logic for the player, including height and checking for collision. Denver gave me some beautiful new models for the ground, player, and enemies. This is where the game really started taking shape.
#MAGICAVOXEL DEAD GRASS FREE#
Feel free to use it in your own projects. There were some hurdles, such as figuring out why the hell the colors weren't matching up with what I expected:īut I eventually figured it out, you can see the class I use here: MagicaVoxelHelper.cs. When the model is supposed to be destroyed we remove the mesh and replace it with individual voxel prefabs that have rigidbodies attached. This allowed us to relatively easily let the piece appear to be 'destroyed' and fall apart. Vox Format) we were able to extract out the individual voxel positions and colors of the models from the vox files. Since the MagicaVoxel file format is available online (. Then I put in a bit of physics and let the player knock over other pieces.

It turned out to be quite a bit easier than I thought, then again I am severely limiting the use of the Y axis so it's almost like working in 2D I got a grid layout working and some basic player movement. This was my first time working with 3D at all, so I made up some quick models in MagicaVoxel (based on Denver's sprites), put them in Unity, and got to work.

So I've decided to post a sort of "summary" of the development process so far, since we did do a decent amount of development before starting this devlog.
