Saturday, September 14, 2013

Voxel Worlds

I think I need to work on some sort of voxel world building game (aka Minecraft - or should I say, NedCraft, MiNed?)

Some numbers:
Figure 1 GB allocated for the world (which should fit nicely into memory on modern machines - you could go to 2 or 4, but not 10 or 20 yet).  One byte per block gives 255 active textures (plus empty).  That should be plenty (Minecraft has a ton of items and creatures, but those can be handled separately).

1e9 blocks sounds like a lot, until you start trying to fill a globe with them...

That's 1000 blocks cube, if each block is one meter, that's only a 1km cube (which is a pretty small planet).

You might use a lazy system for allocating, but that opens the possibility of the total storage growing enormous over time.

It seems better to limit the depth, and spread the blocks over a greater area...

Of course, you need some volume above the surface as well...

500 m high, 500 m deep... 1 GB goes fast!