I wanted my turn based strategy game to be a bit different so after a bit of searching around for ideas I thought I’d have a look at voxels. This gives me the chance to look at destructible environments and possibly do the artwork myself with MagicaVoxel.

There are some guys and girls out there producing some amazing stuff with voxels – see sir carma.

The first step was to knock something up quick with MagicaVoxel, import it in to unity and then see about destroying it. First thing I did was to just make a cube with a couple of colours and a different internal colour. I exported the object in obj format and took a look at it in Unity. I also imported a couple of example models supplied with MagicaVoxel so see what kind of scale I wanted.

I then bought MagicaVoxel Qubicle To Unity from the asset store which was nice and cheap (I’m broke but £5 to save me a days worth of work seemed like a good deal to me) and used it to create a prefab. This asset came with source code so I was able to see how it worked and make some changes. I noticed it created a brand new texture for the model based on the voxel colours used which I didnt want. Instead I wanted to use the texture colour map that MagicaVoxel used which is a 256×1 texture so I could use the same material for the objects or supply my own texture and specify UV mapping. Next I set about adding a couple of methods to hide voxels and rebuild the mesh. Then on collision with a bomb I remove some of the voxels within a radius. Performance seemed good once I pooled some cubes for an explosion effect. I was starting to like this…

I added island detection to check for voxels that are not connected to the ground so they could be removed which is useful for destroying walls. I had a small test scene where I could add walls or floor and wander round and throw a grenade to blow things up. Next I wanted to add a baddy which would explode on hit. This was my first real model in MagicaVoxel…


A Ghost in a 80’s Gauntlet style.

I put a couple of these on and changed the grenade to a bullet and shot them to pieces. From here I decided to mock the first level of Gauntlet so I could see how it was all going to look.


No Key? No problem in voxel gauntlet.

I put a few posts on twitter just to show off my voxel work and although its just a simple prototype with poor visuals its proved to be quite popular.

Problem is I think I’m starting to like this a little too much myself and I’m swaying towards doing a Gauntlet style game with this :/

Leave a Reply

Your email address will not be published. Required fields are marked *