Major update to the "climate" system
March 19, 2020 13:09
Previously, most subsystems of the World API that powers the Iron Arachne website used a "climate" subsystem as a foundation. If you generated a culture, for example, the first thing the API would do is generate a "climate" and then proceed to build the culture's traits based on that.
There were a few problems with this approach. First, I was conflating climate, biome, and geography into a single concept. Second, it meant that anything that relied on a piece of the climate had to rely on the entire climate subsystem.
Now, that subsystem has been removed and replaced with four separate subsystems: geography, climate, biome, and seasons. Geography refers to the physical traits of a particular location - distance from the equator, distance and direction to the nearest mountains, distance and direction to the nearest ocean, altitude, temperature, and humidity. Once a geography is generated, it's used to generate a climate. A climate refers to the cloud cover, wind speed, and wind direction for an area. Once a climate is generated, then a biome is generated from both it and the geography. A biome determines what fauna and flora live in a particular area, and has a name like "temperate deciduous forest" or "tropical rainforest." Seasons are generated last based on the climate and geography, and round out the set.
Once all of that is generated, then it's collected into a "geographic region" and animals and vegetation are generated. The geographic region is what is now used to generate a culture or a region.
This work is important conceptually and lays the foundation for generating a full world. However, you won't see much difference in the Iron Arachne website at first.
Side Effect #1: Music Style
The first side effect of this change was that the music subsystem broke. Musical instruments were the primary output of this system, and they relied on climate in a way that was old and "smelled bad" from a programming perspective. So, I threw it out and rewrote it from scratch. Instead of generating instruments, it generates a style of music. I did some basic research on musical theory and culture variations in music in order to build this system. I learned in the process that there is way more to musical theory than I ever suspected, and it delves into areas of science as well as art.
Side Effect #2: Food and Drink
Food and drink styles for cultures also broke. This was a more insidious problem, though, as it revealed inadequacies in how plants and animals were populated for a region. I fixed the issues with food and drink so that the site would function again, but I really need to add a lot more plants and animals to the database used to generate regions. There just aren't enough in the system yet. This is a data entry problem and just requires time.
I'm working on adding more plants and animals to the database. This is a bit tedious, but it also includes doing research on various species, which is turning out to be fascinating.
After that, I will be working on something much more visible to users: the map system. I have a hard time wrapping my head around the math required to generate decent-looking maps, but it's time to slay this ogre.