No, Survivalcraft is not dead and I am not a zombie, source code is not lost and my laptop is still in one piece :-) I haven’t posted anything for a while, but it doesn’t mean I am not working on it.
Actually the work slowed a bit for the last several days, but I have a good reason for that: I am moving house!
Unfortunately this will be dragging on for some more time, but I am still finding bits of time now and then to get some work done on the game.
Anyway, here’s the latest screenshot from my explosion testbed:
The yellow/blue stuff is the explosion pressure (the more yellow the more pressure). Grey blocks are walls. On the screenshot, the explosion originated in the far end of the little tunnel made from walls. It then propagated out of it, hit the wall and spread sideways, finally fizzling out in the open space. You can see that as long as you are inside of the tunnel the pressure stays high, while it quickly drops once in the open space. This is what this is all about!
Actually the world there is 3D and you only see one 2D slice of it, but it doesn’t really matter.
The post will now get a bit technical if you forgive me.
As you see, what I am trying to achieve is realistic pressure propagation. It also must be fast, because it has to run on the phones. I thought it will be easy, but it’s anything but. All the successful schemes I tried so far involved multiple iterations through the entire explosion space, and this is just too slow. Single-iteration algorithms are hard to come by, because they must propagate “globally”. For example if there is a hole in one side of the tunnel, the pressure on the other side must be lower, even though the two places might be far apart and not knowing about each other.
I went as far as looking into Minecraft wiki to see how they do it. It turns out they simply shoot rays straight from the explosion point, so there’s no pressure propagation there and no fireballs will ever chase you through the bendy tunnels. As a result I won’t be tempted to cheat by doing it their way.
My current idea, the one behind the screenshot, is pretty novel and came to me only two days ago while I was doing house stuff shopping. It seems to work, but it’s too early to call yet. The biggest problem with it is that it does not produce completely spherical fireballs in the open space and that it is surprisingly slow where it shouldn’t be, but I will get to the bottom of it.
I think 1.25 will be the weapons update.