Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Moshman

Rain and thunder.

Recommended Posts

How would I properly implement rain and thunder? I know there is some special Hexen/ZDoom thunder thing, but I do not know how to implement it. I am using ZDoom with Doom Builder 2.

Share this post


Link to post

I'm, fairly certain mapinfo can support thunder, rain might be a little trickier. These should be mentioned somewhere in the zdoom wiki.

Share this post


Link to post

If you want, I can upload a more extreme example of "Rain and Thunder" than just a MAPINFO line and a couple spawnspots.

EDIT: http://www.filedropper.com/rain

Load with GZDoom (something recent), Doom 2. Keep in mind that it IS a tad intensive, so it may be a tad choppy on older comps.

Hit / (or rebind it) to open the little debug script I made that will tell you what's changing when.

This is based off of, I think, JohnnyFive's (right?) weather script, with added effects of multiple layers of rain (light, heavy, and mist, IIRC). Also I added a phase script so that the weather fades in and fades out randomly over periods of time.

Feel free to use any bit of this, code, graphics, or otherwise, as long as you credit me for the extra coding and graphics and J5 for the base rain coding (he has an SDK type thing around here somewhere).

Share this post


Link to post

Holy crap! FPS eater for sure.
I just want simple rain and thunder, I looked at the map script and it almost gave me a seizure.

Share this post


Link to post

The ghetto way of doing it (and this will work with doom2.exe) is to have an animated, transparent rainfall texture that's made into two-sided, passable linedefs in a grid.

Share this post


Link to post

Upon further studying of your code, I have been able to reproduce conditions within my preferences. I have learned a great deal about scripting.

I will be sure to give you credit even though I wrote the code in myself, because some parts were carbon copied. I will also be sure to credit the author of weather.acs.

For testing purposes, I used your sprites, but I think I will be remaking them to suit my map better.

Thanks for the assistance.

Share this post


Link to post

An alternative scripted method

http://forum.zdoom.org/viewtopic.php?f=19&t=18993


If you just want simple lightning flashes in your maps (like Hexen) then you can do this via mapinfo. If you want a thunder sound to accompany these, provide appropriate sounds and Zdoom will automatically play them. If you want the sky to change, that can also be done - all through the mapinfo keyword.

There is a simple example here:

http://members.lycos.co.uk/enjay001/

About 1/3 of the way down the page you will see "Multiple sky effects in Zdoom". The file that you want to try is redsky.zip. Load the WAD into Doom2 then go outside and wait for a bit until the thunder effect happens.




If you are getting into scripting, you might like to know about the lightning script type. These are scripts that run every time the mapinfo lightning is activated. Also, there have recently been added some ACS commands to start and stop the MAPINFO lightning effect.

Share this post


Link to post

If your wad is for single player, don't render more than you need. You can use ACS to find the position of the player and only spawn the rain around them or only in areas where the player can see. This might be quite obvious to some, but I've seen all sorts of rain spawners and most were pure shit or just lagged too much.

Share this post


Link to post
EarthQuake said:

I've seen all sorts of rain spawners and most were pure shit or just lagged too much.

Like my first attempt before I incorporated J5's method? :P

Share this post


Link to post

I am developing this primarily for single player, but down the road, I will implement cooperative play and deathmatch.

Share this post


Link to post

Steeveeo, how do I get the thunder sounds to not play throughout the entire map? Like the further away the source of the sound, the quieter the sound is.

Share this post


Link to post
Moshman said:

Steeveeo, how do I get the thunder sounds to not play throughout the entire map? Like the further away the source of the sound, the quieter the sound is.

Simple, use a localized sound rather than a world sound, though I am kinda curious about just what kind of thunder you are trying for. :P

Lemme find the code here.

EDIT:

http://zdoom.org/wiki/SNDINFO : look at $ambient.
http://zdoom.org/wiki/ThingSound : ACS code possibility.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×