Kamis, 17 Januari 2013

Water

Water has been a lot difficult than I had anticipated, I thought I could set up some simple rules and let it propagate itself but it seems that liquids are a lot more complicated than I thought, three times with three different prototypes I ended up with infinitely expanding water producing a tidal wave that would engulf the map.

Quite beautiful really, I'll need to add something like it as a natural disaster type event at some point.

My goal has been to make finite water that slowly drains when spreading but can stay stable in a small lake or pool. My newest version works with chunks that keep track of stable and flowing water, updating the flowing water every few milliseconds and it looks like this:

The sides of the water blocks being visible through other water blocks is a bug while I work out water height based on amount of water in the block.

I'm not sure I like even this newest version so I may have to re do it at some point but for now it works, it collects in pools and flows when given the chance.
templates-office.com Voxel Dwarf Game