Sunday, April 23, 2017


This is sorta a vague post but here's the jist of where I'm at:

I rewrote the liquid physics 4 times and tweaked them a ton until I got "flowing" behavior where there are little natural currents and they flow down horizontal pipes and such. It is also tunable for viscosity, local (grains of sand only need to care about their neighbors), and efficient. That's really one of the big fundamental pieces of a falling sand game so it's nice to have that (mostly) done :). There are a few tweaks I would like to make but it is basically just working great. I don't reproduce the behavior of "connect two cups by a tube at their bottoms and fill up one and it will evenly distribute to have the same level as the other" but all falling sand games I've seen so far also don't reproduce that behavior so I figured it was okay. I am curious if there is a local way to do this however and if I can find one (my method might generalize to that for example) I might share because I haven't found anywhere that solves that problem yet. Even dwarf fortress had to use a non-local method.

I've redesigned the GUI so you have this little pallete you can pull up where you can select blocks by just dipping your right hang sphere/cursor into those colors which then gives it a little glow of that color.. Then you can hold the trigger thing and your 3D cursor sphere thing gets a little bigger to denote that you are placing source blocks instead.I'm quite happy with how that turned out. I also made the background black instead of the default unity skybox and made a little wire mesh around the play area where you can place blocks, and added basic "tutorial" text on one of the walls for reference which I'd like to later make hidable. I also added grass, fire, and sand to my new physics, and made it so you can move around with the controller.

I have three individual compute shader calls per timestep because there aren't global barriers to tell everything to finish before moving on otherwise as far as I know. I split those apart into being called on separate "ticks" and that small change got me up to 56x56x56 and 64x64x64 blocks at VR speedsif I optimize things heavily which is a huge improvement.

I also probably did other things I don't remember.

I'm working on adding a few explosive materials right now cause that is mandatory.

I will have to share a video of these things in a bit.

No comments:

Post a Comment