Page 3 of 4
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 09 Mar 2011, 13:45
by Beherith
BaNa wrote:
sup guize
maek
Code: Select all
local s = 2+math.sin (SYNCED.frame/50)/10
into
Code: Select all
local s = 5+math.sin (SYNCED.frame/50)/10
for better rez on a map that big.
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 10 Mar 2011, 22:32
by Beherith
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 11 Mar 2011, 00:00
by knorke
@Beherith
no lava visible and no commanders spawn:
http://pastebin.com/RyS5U9qh wrote:[f=0000000] error = 2, LuaRules/draw.lua, error = 2, LuaGadgets/gadgets.lua, [string "LuaRules/Gadgets/lava.lua"]:133: attempt to call field 'CreateShader' (a nil value)
Also while anybody can of course use this for his own maps please dont make "hotstepper_v2". If you want to mark a fork (ie to show something) call it hotstepper_Beheriths_shader" or something, thanks

Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 11 Mar 2011, 11:33
by Beherith
Sorry about the misleading naming.
What gpu do you have? Does it support GLSL?
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 11 Mar 2011, 14:55
by bobthedinosaur
MMMMm giant lasagna!
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 11 Mar 2011, 15:53
by knorke
nvidia 6800
from googling it seems GLSL should be supported.
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 12 Mar 2011, 02:34
by Google_Frog
Looks nice. Have to tried Spring.SetMapSquareTerrainType to prevent units wandering into the lava? It might not be as slow as you think.
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 12 Mar 2011, 02:45
by abma
next time, can you please upload it to springfiles.com, so lobbies can download it?
i already uploaded it:
http://springfiles.com/spring/spring-maps/hotstepper
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 12 Mar 2011, 07:05
by knorke
didnt think people would actually start playing this...was just for test

Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 12 Mar 2011, 09:02
by Forboding Angel
Behe, that is fucking sweet
the things it needs are:
some sort of steam effect where the lava edge meets with land
a firey ceg when an object enters the lava
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 12 Mar 2011, 12:53
by Beherith
Thanks forb, I dont know lua well enough to do smoke or fire, and I guess that doing it with cegs may be too resource intensive. This current implementation is nearly free, I also added normal mapping to it since.
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 12 Mar 2011, 15:02
by BaNa
the v2 lava looks very nice! we are getting places with this concept!
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 12 Mar 2011, 15:36
by abma
@knorke:
uh, then sorry. for a "test" map it is awesome! :)
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 13 Mar 2011, 00:43
by MidKnight
Forboding Angel wrote:Behe, that is fucking sweet
the things it needs are:
some sort of steam effect where the lava edge meets with land
a firey ceg when an object enters the lava
steam might be expensive.
...maybe we can ask the engine devs for an API hook into whatever is used to make that sweet bumpwater-shorewave goodness? (This is 100% uneducated babbling, here).
For a firey CEG, you can use ZK's Units on Fire widget.
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 13 Mar 2011, 01:58
by knorke
i had ceg for lava death but iirc if the ceg was visible only in LOS, then you would never see it (as the unit was dead) and otherwise you could tell where enemies died.
where the lava edge meets with land
thats tricky to find out in cpu friendly way.
Beherith, can you make the shader fall back to normal if gfx card/drivers does not support it? but then looking at it there seems to be such switch already..?
abma wrote:@knorke:
uh, then sorry. for a "test" map it is awesome! :)
its also awesome to watch people not believe there will be lava and then die.

superlol to watch games.
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 13 Mar 2011, 08:47
by CarRepairer
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 14 Mar 2011, 17:04
by BoSTGI
knorke i can use this gadget in other map?
because i posted a test map with this code..
if i cant do that tell me i remove the gadget.
thx
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 14 Mar 2011, 19:12
by knorke
BoSTGI:
YES! of course everybody can use it for his maps, my map is just a demo.
Just add a link to this thread (like BoSTGI did) so other mappers can also read up on the gadget.
http://springfiles.com/spring/spring-maps/highjump-3
this map i guess?
Played an older version of the map in a TechA game btw.
Noticed you added more detailed warnings, good idea.
But this:
Code: Select all
if (tideRhym[tideIndex].targetLevel == 60) and
((lavaLevel - tideRhym[tideIndex].targetLevel) > (tideRhym[tideIndex-1].targetLevel - tideRhym[tideIndex].targetLevel)) and
((lavaLevel - tideRhym[tideIndex].targetLevel) < (tideRhym[tideIndex-1].targetLevel - tideRhym[tideIndex].targetLevel) + 1 + tideRhym[tideIndex].speed) then
Spring.Echo ("LAVA in MIDDLE!")
end
is a bad way to do it because now you have dozen of code lines just to output some warnings because such a block is needed for each lava tide. Another problem is the
if (tideRhym[tideIndex].targetLevel == 60)
Now if you want to adjust the level of this tide, you have to do so in two places: At the top in the addTideRhym () and in the place where you display the warning message. Easy to lose track of such things.
Generally if you need lots of c&p there is a simpler solution
A better way to do would be a fourth parameter like this:
function addTideRhym (targetLevel, speed, remainTime, warningText)
And then for display do
Spring.Echo (tideRhym[tideIndex].warningText) )
so it could be used like
addTideRhym (300, 0.1, 60, "Danger: High Flood coming in!")
Not 100% what you wanted to do with the long formula but if you wanted to know if lava is going up or down you can just do:
if (lavaGrow > 0) then Spring.Echo ("lava raising") else Spring.Echo ("lava sinking") end
CarRepairer:
arent you old enough to make your own pizza?
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 14 Mar 2011, 19:57
by Beherith
Here is the GLSL version of the shader (with working fallback to normal gl, some glow effects, undulation and darker lava where it meets land.)
Needs heightmap to be supplied with map.
Re: NEW MAP: Hotstepper (lava map for anyone)
Posted: 14 Mar 2011, 20:04
by bobthedinosaur
Beherith wrote:Needs heightmap to be supplied with map.
What do you mean?