Page 1 of 2
[WIP] Lava and other bad stuff
Posted: Tue Dec 11, 2012 4:50 am
by Rook
After noticing this lovely little mod on Nexus
http://grimrock.nexusmods.com/mods/119/. It sparked the idea to do more with environmental features.
Off the back of the design of this mod, I've created lava. Currently, it deals damage via invisible pressure plates and a simple self damage script. I'm needing a script to deal damage over time. Possibly a "burning" condition.
Done
Particle effects
Light source
Damage sound
TO DO:
Animate lava
I'm also working on poisonous mist.
If you have any suggestions on how to improve this mod, then please feel free!
EDIT:
I'm currently using a rough damage-over-time rigging with a spawner/receptor, timer and counter. It's a little clunky. Is there any way of creating my own "condition"? Or failing that, a simple damage-over-time script that lasts 5 seconds.
Re: [WIP] Lava and other bad stuff
Posted: Tue Dec 11, 2012 5:13 am
by Neikun
Animating might be hard to do at the moment, but particle systems are doable.
I think Petri was working on animate-able objects for the next patch.
Re: [WIP] Lava and other bad stuff
Posted: Tue Dec 11, 2012 5:19 am
by Rook
I could possibly create a particle emitter and spawn a few different layers of lava to float around the surface. I'll test it out later.
Re: [WIP] Lava and other bad stuff
Posted: Tue Dec 11, 2012 5:00 pm
by Grimwold
you could set up a timer that goes off every 5 seconds. when it activates it runs a script that checks to see if party.level, party.x and party.y are in a table of values indicating where the lava is.. if the party are there, then damage them.
alternatively you could use an idea similar to that which I used for anti_magic zones.. clone an invisible pressure plate and name it lava. place lava entities in your dungeon on every space... when the timer activates run a script to check entitiesAt(party co-ordinates) for name == "lava" if it finds a lava entity then damage the party.
Re: [WIP] Lava and other bad stuff
Posted: Tue Dec 11, 2012 8:52 pm
by Rook
Grimwold wrote:you could set up a timer that goes off every 5 seconds. when it activates it runs a script that checks to see if party.level, party.x and party.y are in a table of values indicating where the lava is.. if the party are there, then damage them.
I have done something similar to that. I have set up pressure plates around the perimeter of the lava, that toggle a continuous damage script. This gives the effect of constant burning from the lava, until you leave it.
Re: [WIP] Lava and other bad stuff
Posted: Tue Dec 11, 2012 9:00 pm
by LordYig
Nice texture !
I think the simplest (and maybe the best IMHO) way to animate this is to make a particle system with animated frames.
I do not know if there is a limit in size for a texture in game, but this could require a very large texture resolution if you want to add a 1024x1024 pixels map.
But it could be nice looking even with a smaller map.
Edit :
I take back what I have said earlier...
I have made a quick test with an animated water texture and the particle system is always oriented towards the camera, i.e. vertically.
I wasn't able to align the particle system to a model on the floor (horizontally) and also I wasn't able to make a particle system without any hazardous orientation and random rotation.
If I'm not wrong, this means that two particles systems placed in two adjacent tiles cannot be aligned properly like static object can (on a texture basis).
Re: [WIP] Lava and other bad stuff
Posted: Wed Dec 12, 2012 10:14 am
by Rook
The best I could get to "simulate" a moving surface was a particle system under the lava, emitting the same colour particles. This gave the lava a kind of bubbly and wavy look. Note, the particles had to expire just as they reached the surface of the lava.
Re: [WIP] Lava and other bad stuff
Posted: Wed Dec 12, 2012 12:25 pm
by flatline
I've been considering how to create an illusion of a shifting texture. What if we create several versions of the water/lava object, make them semitransparent and with slight offset/rotation of the texture? could it at least be made to shift back and forth in a believable manner if a few versions were stacked on each other and deleted/respawned in order?
Re: [WIP] Lava and other bad stuff
Posted: Wed Dec 12, 2012 12:28 pm
by Rook
I don't see why that wouldn't work, but it seems like an awful lot of work to get a few pixels "moving". I suppose we will have to stay true to oldschool rpg and use our imagination when it comes to lava. Haha
Re: [WIP] Lava and other bad stuff
Posted: Wed Dec 12, 2012 12:30 pm
by flatline
We can always wait for the patch, but I am slightly impatient
