New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New weather #8218
New weather #8218
Conversation
Provides the essentials for a new weather generator that would give continuous, static pseudo-random procedural weather from a seed. First commit adds the main class that calculates the variables required (temperature, humidity, pressure) and a test function that outputs a csv file for plotting. It is not yet plugged into the game, but the groundwork is there to replace the update_weather() function in game.cpp. This is as of now not concerned with the gameplay aspects of weather or adding new weather types. Yet.
Conflicts: src/weather_gen.cpp
Added first draft of function to resolve a weather object to an in-game weather condition such as rain. Using the old weather enum for now.
Conflicts: src/weather_gen.cpp
[WIP] Some cleanup
clarifications
Changes the noise generator library.
This reverts commit 60d00b9.
…generator. Needs to be refined.
fix call to rotten instead of calc_rot in map.cpp add call to calc_rot on process_active_item
Conflicts: src/game.cpp src/game.h
…her-funnels Conflicts: src/map.cpp
it was there due to a bad refactoring copy-paste don't refactor by copypasting, kids!
We should probably keep acid rain. It's flavorful, appropriately dangerous, threatening, and useful. Also, wasn't someone working on some kind of humidity map that was supposed to simulate appropriate weather? |
Impressive. And this resolves all the acid rain related bugs (-; I just recognized that this is at least the 3. place where the turns are normalized based on the season length. The other two are: plants that grow to the next stage when the submap gets loaded ( |
Headjack: This is the thing that simulates appropriate weather. Since it simulates appropriate weather, acid rain is unappropriate always. I also like acid rain, but we discussed this and came to the conclusion that it will have to be a special weather caused by something else than the regular global weather. So that's why I left it out. It's not removed, just left asidefor now. BevapDin: Thanks. I noticed the same thing. Also thought that rotting should also be somehow tied to season length, but I didn't include it here because it went way out of scope. =3 |
@@ -520,73 +488,33 @@ std::string weather_forecast(radio_tower tower) | |||
// Accumulate percentages for each period of various weather statistics, and report that | |||
// (with fuzz) as the weather chances. | |||
int weather_proportions[NUM_WEATHER_TYPES] = {0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused now.
Longer term I want there to be a master time dilation factor that scales everything. If it's 1.0, things proceed at the speed they do in the real world, or our best approximation. Probably by default it'd be set to 0.2 or so, so things proceed much faster. |
fired John; he was giving too precise weather reports hired a blind weasel to make the weather reports; now they are appropriately innaccurate
so we had a party
things won't instantly rot anymore some say this is a good thing
I seem to recall there was a PR which implemented snow, but can't find it right now (poor connection). Do we have snow here? @kevingranade : +infinity for master time factor. |
we had a bad day the last time that happened
this will ensure food actually rots each turn food that never rots is bad for our business
again the first time wasn't good enough it will need another fix to be sure there are never enough fixes to be sure
Zireael07: I haven't touched anything related to the actual effects of weather besides funnels and food rotting. There's snow, but I don't think there's snow piles. |
Makes weather behave in a reasonable manner and be saved in just a single int.
Removes acid rain because there's no good way to implement it.
Removes the weather debug menu because it needs to change a lot, but is not really that necessary.
Old savefiles may experience a sudden weather change after loading due to the old weather stuff just being ignored completely and replaced by this.
Things that will need some testing:
Right now the weather is checked for every turn. In my machine this works fine, but lower end may experience slowness when waiting/crafting.
Large arrays of funnels left working in an unloaded chunk may cause lag when loaded again the longer they were left unloaded.
The radio station code that makes weather reports is completely untested. It is also totally accurate currently. No randomness added.