Skip to content

Random Weather - #676

Open
VodkaNET wants to merge 4 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
VodkaNET:random-weather
Open

VodkaNET wants to merge 4 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
VodkaNET:random-weather

Conversation

@VodkaNET

Copy link
Copy Markdown

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)

GeneralsOnlineZH_RmlUI_Test_VRcu2RzwER

New Weather Cycles

I have implemented several variations of rain cycles:

  1. Light rain (barely noticeable during the day; makes no sound)
  2. Heavy rain (clearly visible; includes sound)
  3. Storm (intense rain accompanied by thunderstorms)
    Each of these is factored into the weather generation process at random. Snowfall is selected based on the specific map.
GeneralsOnlineZH_RmlUI_Test_f0IETMYdFj GeneralsOnlineZH_RmlUI_Test_gOgcV0nWHl

Day (Dry)

GeneralsOnlineZH_RmlUI_Test_SklntSt681

Night (Heavy Rain)

GeneralsOnlineZH_RmlUI_Test_YerrlofTFB

Night

GeneralsOnlineZH_RmlUI_Test_ZAphRv61mk

Afternoon

GeneralsOnlineZH_RmlUI_Test_3HtdZrwiyC

Evening

GeneralsOnlineZH_RmlUI_Test_Azulqj87Ih

Afternoon (Storm)

GeneralsOnlineZH_RmlUI_Test_kzlciWXEk4

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! :)

@github-actions

Copy link
Copy Markdown

⚠️ Title/Commit Validation Failed

Invalid PR title:

  • Random Weather

Invalid commit messages:

  • Disable Weather Debbuging
  • Check box "Dynamic Weather" to stock Generals UI
  • New Rain Cycles + Improved Logic Dynamic Weather
  • Dynamic Weather Basic Support
    PR titles and commit messages must follow conventional commits format:
type: Description
type(scope): Description

Allowed types: bugfix, build, chore, ci, docs, fix, feat, perf, refactor, revert, style, test, tweak, unify

See CONTRIBUTING.md for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant