Monday, December 30, 2013

On Other Things

By other things, it should be clear that I'm referring to neither fictional writing nor 3D modeling. If the reader has seen my introductory post, then what should immediately come to mind is programming.

In this case, my pursuit in crafting a game.

I won't bore you with the entire history, but to say that this was a long time in coming. Nearly a decade of time, starting with my dabbling in Python to becoming a full fledged C++ programmer capable of building something from scratch.

Without further adieu, I would like to introduce Atomata, an editable voxel engine.

So, Minecraft. But with arbitrary colors?
Well, yes and no. It most certainly has blocks. It also has random colors, but this is a technical demonstration of the underlying system. Very much unlike that other game you mentioned, it relies on a far more sophisticated method for storing the voxel data. Mainly, instead of storing the data in a 3 dimensional array or list, it stores the data in an octree.Which for my purposes, is a sort of, on the fly editable, compression method. A way to think about it is that an octree allows the application to just keep track of the boundaries between different block types, instead of storing the entire volume of blocks.

The colors represent the level of octree that makes up those blocks. White being one block leafs. Golden yellow being 2x2x2 block leafs. Purple 4x4x4 and etc. So, wherever there are volumes with the same block type, they can be represented by a larger leaf of the corresponding size which only consumes the memory of a single block, but still represents that larger volume. (This also gives opportunities for optimizing processor time significantly, but that is for another time.)

The quick among you may note that if this was a more natural terrain, the surface would all be single block leaves, thus saving nothing in memory. But then you would be forgetting that this is a volume and not just a surface. Those larger leafs would find themselves underneath the ground and in the air above.

In the video presentation below, I'm testing with a 10243 block chunk. To represent this directly, would take well over a gigabyte of memory, but with an octree, it's a tiny fraction of that size. Even in the general case of a natural terrain, it's predicted to only take a few megabytes for this same volume.


All future videos, like the one above, will be posted on the Atomata YouTube channel.

Now, I only just started this project on December 14th (the fall semester had just finished). So, it clearly needs a lot of work. For one, it regenerates the entire mesh whenever a block is added or removed, which starts to stutter with each edit when the number of white blocks increases, unacceptable.  Below is a list of things that need to be worked on, but not necessarily in any order. This is what I'm sticking with, no feature creep please.
  • Optimize Mesh Generation
  • LOD
  • Infinite World
  • Collision Detection
  • GUI
  • Textures
  • Network Interface
  • Modularity/Plugins
  • Increased Resolution
Now lets see if I can get some more writing done.

No comments:

Post a Comment