Page 1 of 1

akLattice, a renderer and physics simulator for voxel worlds

Posted: Thu Aug 30, 2012 8:58 pm
by ArbitraryValue
Some of you have no doubt played Minecraft or Dwarf Fortress, games that (to an extent) simulate physics in a world made out of cubic blocks. I set out to create an efficient renderer for such worlds in Ogre, and to use it to display more sophisticated physics models that I am developing. I have incorporated my model for water (including the effects of pressure) and for structural integrity. Thus, I present akLattice! I know it isn't as pretty as most of the other projects here, but I hope it will be interesting anyway.

Image

Image

To download, go to https://dl.dropbox.com/u/46417406/akLattice.zip. Right now, only a Windows build is available, but that is only because I have not had time to compile for other OS.

Features:
-Efficient water simulation, including the effects of pressure. (Water will flow straight up when appropriate, like in Dwarf Fortress.)
-Simulation of stress propogation and the collapse of unstable structures.
-Efficient 3D rendering of the simulated world. (Albeit with primitive graphics.)
-Mouse and keyboard interface.
-Uses popular, free, open-source Ogre 3D engine.
-Code will be released as open source.

Controls:
-'Esc' to exit.
-'F1' for perspective mode, 'F2' for a horizontal cross-section, and 'F3' and 'F4' for perpendicular vertical cross-sections.

In perspective mode:
-mouse and WASD to fly around

In horizontal cross-section view mode:
-WASD to scroll around
-Q and E to move up and down a level, respectively.
-left-click to place blocks
-right-click to destroy blocks
-middle-click to create water
-block placement supports drag-selecting, even across levels (press Q or E while holding down the mouse button)

A word of warning: don't try to change large horizontal areas at the bottom of the map all at once; the algorithm will take a long time figuring out where the weight from all those tons of rock above the new cave goes, even if there is no cave-in. I'm still working on that.

Re: akLattice, a renderer and physics simulator for voxel wo

Posted: Wed Sep 05, 2012 10:11 am
by Denis_
When you planning to open your sources?

Re: akLattice, a renderer and physics simulator for voxel wo

Posted: Wed Sep 05, 2012 11:19 am
by bstone
Denis_ wrote:When you planning to open your sources?
And why would he plan that? Somehow people who post things like that as their first answer to the topic don't look good to me :evil:

Re: akLattice, a renderer and physics simulator for voxel wo

Posted: Wed Sep 05, 2012 11:26 am
by bstone
ArbitraryValue wrote:Some of you have no doubt played Minecraft or Dwarf Fortress, games that (to an extent) simulate physics in a world made out of cubic blocks.
Looks pretty cool! How do you plan to tackle varying materials of the blocks? I think that would be one of the decisive factors of the "efficient renderer". Or do you have a working batching strategy already?

Re: akLattice, a renderer and physics simulator for voxel wo

Posted: Wed Sep 05, 2012 11:58 am
by Zonder
bstone wrote:
Denis_ wrote:When you planning to open your sources?
And why would he plan that? Somehow people who post things like that as their first answer to the topic don't look good to me :evil:
He actually mentioned in his post :D . It also does support multiple materials in the editing part.

Looking good so far keep up the good work :)

Re: akLattice, a renderer and physics simulator for voxel wo

Posted: Wed Sep 05, 2012 2:33 pm
by bstone
Zonder wrote:He actually mentioned in his post :D . It also does support multiple materials in the editing part.
Oh my... I missed that line completely. My apologies to Denis_ then. :oops: