Looking through your code I notice some "lava" stuff... ...
As far as I can tell this is some kind of horizontal layer to represent lava :o , but lava that some how reacts to the world that it inhabits... mmm... Ripples??? That would be V COOL!!!
Thing is the code doesn't draw to the world in any way.
So. My questions are
1: What is the code for?
2: How can I make it do what it is supposed to do?
P.S. I like your system for making areas of the map have different toughness!!! I was thinking about this kind of problem, not so much for toughness but indestructable areas. After every blast of the map I was going to re-"set_" the areas that I wanted to remain solid... not the best way.
Well now i've seen your idea my head is buzzing with lots of possibilites!!! Certain values could be for NO destruction, other bits of the byte could encode the material type so different sounds would play when shot, different particle effects, different colouring of voxels, debris could spawn in different base shapes... buzzz buzzz buzzz :shock: buzzz buzzz buzzz
Tomkh at
Hi. This lava was my attempt to make 2d lava effect. It's just for flat animating lava over flat ground, similiar to lava effect in Quake 1.
I disabled it, because:
1. It doesn't work well with destructable terrain (it is just static animation).
2. It is slow (it was just a quick hack).
Of course you can try it, just change line 359 in justfly.c to "ground = 0" instead of "ground = 1".
And put this directory/file in the justfly.exe dir:
http://sphere.pl/~tomkh/lavapng.zip
About toughness: it is nice hack, might be useful, and you have some nice ideas.
But I guess it would work much better with "mydestroyfunc(x,y,z0,z1)" supported natively in voxlap, where (z0,z1) is the column start/end that is about to destroy and the function return a small list of column spans that should be destroyed instead (and if the list is empty nothing will be destroyed)..
Actually you can implement it on your own. There is "setspan" function - just you need to rewrite setsphere/setellipse/setrect/etc.. (to maybe mysetsphere, mysetellipse etc..).. that will call mydestroyfunc for every generated span (to clip it against your non-destructable geometry and decrease the "hardness" value) and finally pass the merged lists of spans to setspan (with -1 argument = remove).