Skip to content
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

Merged
merged 57 commits into from Jul 17, 2014
Merged

New weather #8218

merged 57 commits into from Jul 17, 2014

Conversation

Efimero
Copy link
Contributor

@Efimero Efimero commented Jul 12, 2014

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.

Efimero and others added 30 commits July 2, 2014 08:40
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.
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.
Changes the noise generator library.
@Headjack
Copy link

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?

@BevapDin
Copy link
Contributor

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 (map::loadn), and brewing / yeast producing.

@Efimero
Copy link
Contributor Author

Efimero commented Jul 12, 2014

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};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused now.

@kevingranade
Copy link
Member

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
things won't instantly rot anymore
some say this is a good thing
@Zireael07
Copy link
Contributor

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
@Efimero
Copy link
Contributor Author

Efimero commented Jul 13, 2014

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.

@KA101 KA101 merged commit e1f611c into CleverRaven:master Jul 17, 2014
@Efimero Efimero deleted the new-weather-funnels branch July 17, 2014 04:04
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.

None yet

7 participants