Status Update #4: Realtime Weather Change


This week I started getting deeper into the weather system in Total Chaos. Sky-dome transitions are now fully functional, and almost seamless!

Some of the sky-dome textures I am currently using are placeholders and will be replaced in the near future with something a bit moodier.

2Rain is also plugged into the transition system, and is working pretty good so far. The rain drops are clumped together in a larger sprite to help save performance.


The trickier task this week was making the sound effects on the rain change depending on if the player is indoors or outdoors.

We got a placeholder rain sound loop and sliced it up into 2 second clips that loop over the duration the rain is active by selecting a random clip, we then check the players current ceiling texture to detect if the player is indoors or outdoors. If its not set to F_SKY, which is the default skybox texture in the Doom engine, then we tell our sound switcher clip to fade the audio to an indoor variant of the rain loops.

It is a bit hacky, in a traditional engine you would simply be able to fade between two sound loops, but this is the kind of stuff we have to do daily to get the results we’re after.




More to come, stay tuned for even more weather shenanigans!

5 thoughts on “Status Update #4: Realtime Weather Change

  1. Nice work! Just a thought, though. Would it be possible to get different rain sounds to play for things like a thin metal shack, where you would hear both the tippity-tap of the sheet-metal being pelted by rain drops mixed with the outdoors rain sound in a separate file?

    • Actually, you can fade between two loops… “kinda”

      It is a hacky way, but if you spawn an actor which plays the sound of rain, you can make the sound fade away if you move the actor further from the player and meanwhile you can move the actor playing the indoor sound closer to the player..

      It has one possible disadvantage.. which is sound panning.. but you can avoid that by having more of the actors playing the same sound and surrounding the player…

      • Interesting idea, may give it a try when I revisit the sound system. Could possibly solve the panning issue by moving it on the Z axis (up/down).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s