Tuesday, November 30, 2010

Hey, all the cool kids are doing it

"I'm doing a (free) voxel game framework (just a hobby, won't be big and professional like Minecraft) for 386(486) AT clones." ;)

Oh you have to be kidding me, another Minecraft clone?? Well... sorta. :P  Right now the focus is to create a framework first, and use that for some games later on. I have several ideas, and a good foundation will make it much easier to explore them all. And who knows, maybe this will also be useful to someone else, so it will be open source. (Not yet, but coming soon. I really need to clean up the code a bit first.)

Most importantly, however, it's a learning experience. I have never done any 3-D programming before, and an Infiniminer-esque game is a great way to get your feet wet. :)

It's written in C++, and uses Irrlicht.  The project is still in a very early stage, but there are already a few fun things I can show you. One of my test cases is the famous Stanford dragon:

I've used binvox to generate a 512x512x512 voxel model from the .ply file.  The shadows are computed using ambient occlusion. This is much slower than Minecraft's sunlight algorithm, but I think it looks nicer. (In theory, it is possible to import a Minecraft world, recalculate the light voxels, and export it again. However, MC and Hexahedra are two different beasts, and this is probably easier said than done.)

To be honest, I am amazed at how fast it runs. Sure, I have a nice graphics card (GTX 260), but such an unholy amount of texture mapped cubes in 60 fps? Probably more if I turn off vsync? I'm sure this is old news to everybody else, but this makes me all giddy.

Next time: more about lighting, and showing off the terrain generator.