Repository navigation
Random Weather - #676
Open
VodkaNET wants to merge 4 commits into
Open
Random Weather#676VodkaNET wants to merge 4 commits into
VodkaNET wants to merge 4 commits into
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How does it work?
This is a weather system ported from the World Builder, then implemented and expanded upon. In every match, a random weather cycle-based on a "weather-precipitation" pairing-is loaded for the map. Since Generals lacks proper, built-in rain cycles, I created my own implementation. It analyzes the materials present on the current map and randomizes the weather conditions accordingly. I might add smooth transitions between precipitation types later on; it’s not nearly as complex as implementing smooth lighting transitions.
"Random weather" checkbox in the Generals user interface (already present, based on RmlUI. Check my arctic/go/feat/rmluiI)
New Weather Cycles
I have implemented several variations of rain cycles:
Each of these is factored into the weather generation process at random. Snowfall is selected based on the specific map.
Day (Dry)
Night (Heavy Rain)
Night
Afternoon
Evening
Afternoon (Storm)
Nuances
It has been brought to my attention that changing weather or models can sometimes break pointers for certain objects. I haven’t tested this new feature in multiplayer, so please exercise caution when integrating it. I did my best to design this weather system in a way that wouldn’t break replay support-hopefully, everything will work fine. Just thought I’d give you a heads-up! :)