Playing with water
(Originally posted on Mastodon)
Playing with water in a godot prototyping project.
This is based on a demo by Zylann which I have modified to simulate pressure and allow water to flow upwards when pressure is high enough.
1min30 video showing a (quite ugly) 2D map where blocks are placed on a grid to make a convoluted path. The mouse cursor creates water which flows in the maze following gravity to the bottom of the screen. The water is blue, but turns pink as pressure increases. Pressure also makes the water move upward in some places. At the end the cursor moves to the bottom and begins removing water, which empties the map, excepted for a place where water can't escape. The cursor then makes a hole in a wall to finish emptying it.
It’s fun, but I’m not sure that would scale well in 3D on a 16000x8000x16000 voxels world 😅
I think the key could be to
- efficiently ignore parts of the world where there is no water
- avoid simulating water voxels that are stable (constant level, constant in/out flow) so that, for example, rivers can flow continuously without any simulation cost
But there’s still a lot of work to make that work.