So I’ve decided to take a little diversion from work on Caster… again… and make a small multiplayer voxel based shooter. The development name is Lexov, but it will not ship with that name.
I have this trailer for Lexaloffle’s game Voxatron to blame for this diversion:
Pretty cool, eh? Get more details here: http://www.lexaloffle.com/voxatron.php
I’m targeting Xbox 360 via Xbox Indie Games.
Working on this game with C# on the 360 has some interesting problems that have been quite a bit of fun to try and overcome. For example, say I have a 128 x 128 x 64 volume of voxels. Simply walking across that volume of voxels requires over a million operations. Doing one million operations alone in C# on the Xbox brings my frame rate down to less than 30 frames per second (just write a for loop and increment a local variable to see what I mean).
Here is an early version of Lexov where I am evaluating the voxel volume and adding the appropriate geometry for rendering:
Because of the performance issues with C# on the Xbox, I’ve had to get pretty creative in my approach. I’ve started using approaches that reduce the number of operations that need to be done while favoring doing more work on the GPU (Graphics Processing Unit). For example, in C# on the 360, it’s faster to draw an extra million triangles to save several thousand instructions per frame.
Currently, I’m using several dynamic vertex buffers and updating changes to the buffers as they happen in the game rather than evaluating the entire voxel volume each frame.
One important difference when using this approach is that I no longer have to render cubes on voxel boundaries. This breaks some of the retro feel from being a true voxel volume, but allows for much smoother movement.
At this point I had to ask myself what it was that I really wanted to do with this game. I decided that what I really wanted was a simple fun destructible environment game at 60 frames per second on the Xbox 360. As cool as evaluating a single voxel volume would have been, it was secondary in importance.
Still, it’s hard to sacrifice the simplicity and beauty of the single voxel volume approach. In the end, I’m actually very happy to have sub voxel movement in the game.
Here are some more videos of progress I’ve made.
And earlier today:
I’m going to try and keep an active blog on my Lexov’s progress. I’ve been debating if the extra time to write blog posts is worth it when I could spend that time working on the game. I’ve decided that if I get extra feedback and community support from doing the posts, then it will make for a better game. Caster is a great example of this. Caster would have been pretty lame and boring were it not for the amazing feedback I got while showing the game off to friends and colleagues.
More details on the plans for game play and design forth coming.