Open olleharstedt opened 7 years ago
Climate
- Draught (more sun than rain for multiple years)
- Ice-age (lower temperature for multiple years)
My suggestion for this section is when someone starts a game you use RNG to determine the climate.
Seasons Depends a lot on where on earth you are.
- Winter
- Spring
- Summer
- Autumn
- Rain season
- Dry season
For this I suggest adding days. The way days would work is that 10 life minutes = 1 game day
. This can be achieved by using setInterval()
. Every day would increment a variable (lets say gameAge
). Every 30 days would be 1 month* (this world is perfect). Every 3 months = 1 season (another variable, say gameSeason
). Every 12 months (4 seasons, 360 days) would be 1 year (gameYears
). Game age could be a statistic, as well as time played. Each season would have effects, but that's for later.
* Every month is a full moon, so wolves would have a higher chance to attack.
Weather Including temperature, day-night cycle, moon.
- Rain
- Sun
- Snow
- Storm
See above comment.
OK, I need to explain the architecture a little bit. Do you know what events are, in a programming context? When something happens, one part of the code can send out a notification, and then other parts of the code can listen to it. It's also called the "observer pattern" or "publish-subscribe pattern".
So, there's one important event in civclicker2, called tick
. It happens once each second, and a bunch of plugins listen to it, like the DayNightCycle plugin and Weather plugin.
A lunar month is 28 days, by the way, so I think I'll use that number for the lunar cycle.
Also, I would prefer that one year in game was approx 1 hour of real time, but that a complete day-night cycle is 1 minute. That leaves 60 day-night cycles for one year, so the calendar will be a bit skewed to make playing the game more interesting.
So one lunar cycle might be 10 minutes, or 10 in-game days. That leaves two lunar cycles for each season, I guess (assuming a climate which have 4 seasons - that's very different in different regions).
I think your alternative timing is better, gameplay > realism.
:+1: Great, then I will implement this system!
Hold on there mate! I have more things.
At the start of the game, pick a climate.
They will all have different effects, and it's up to you how to determine them. Tropical, Savannah, Rainforest have 2 seasons.
You should have a look at this data: https://github.com/olleharstedt/civ-clicker/blob/stoneage/docs/agriculture.md
very interesting
Most early civilizations were Temperate or Tropical
How about weather first? It's much simpler. Update: Made semi-accurate weather sim here.
For sure, I just wanted to point out the connection between climate and civilization.
Anyways, is the weather sim I linked good?
Hm, which link?
I'll have a look!
Looks good, but not different from my own code. :) Here: https://github.com/olleharstedt/civ-clicker/blob/stoneage/scripts/plugins/Weather.js#L42
I'll try to setup test pages where we can see the stats of different weather configs.
Thanks. Also, mine is just a proof of concept and only outputs a sequence of raining or not.
Yeah, but you nailed the most important aspect: That the probability of rain is dependent on if last day was rainy. It's modeled using a Markov chain in weather generation algorithms.
One thing, can you add the libraries + modules to my test script? Also, if we're doing ages, my fork will have the Silicon Age.
I thought it would be nice to have a "clean" page where we only test weather parameters, but we can have both, I guess. :)
Silicon age, like space age? I've thought about that and I think it's a good idea. Didn't flesh out any specific concepts yet, though.
Well, I added some things already, such as the resources Silicate
and Silicon
; a building, Apartment
; and finally an upgrade to unlock it all.
If you want I can add you as a contributor on my fork.
This issue is getting long...
Ah, OK! Cool!
No need to add me as contributor, but of course it would be nice if we could merge the two ages eventually, either in your fork or mine.
This is very long, I'm splitting weather and (possibly) ages into separate issues. This issue is now for climate related things only.
Some guys on reddit are actually looking for projects to help with: https://www.reddit.com/r/incremental_games/comments/6w4rao/any_projects_need_an_extra_coder/
Let's see if someone new tags along. :)
Nice! We could use some help. Also, this issue is for climate. I'll make a general discussion issue for normal talk.
Climate and weather.
Climate
Season
Depends a lot on where on earth you are.
Weather
Including temperature, day-night cycle, moon.