Epic sim: Difference between revisions

From Adam Colton
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:


Governments rule lands and people. Religions influence people and governments. Governments collect taxes, religion collect tithes. Governments also have military's. Military's enforce laws, protect citizens and fight wars (conquer or protect territory).
Governments rule lands and people. Religions influence people and governments. Governments collect taxes, religion collect tithes. Governments also have military's. Military's enforce laws, protect citizens and fight wars (conquer or protect territory).
https://mewo2.com/notes/terrain/


== Goal ==
== Goal ==
Line 73: Line 75:


=== Prehistory ===
=== Prehistory ===
Start by placing some production - farms, mines, logging and hunting grounds. Then we start placing workshops based on what's around; each has high value and a low value industry. The idea is that trading for primary needs is too expensive, but it's ok for secondary needs. Also, there's a penalty to being to close to competition, but that can be overcome with enough resources and demand.
Here we place and grow structures. Any of these structures can take up multiple tiles, but at least one of the tiles needs to touch a "road" tile. Each structure is part of a trade network. So a farm will be connected directly to any bakery or market nearby.
* Bakery: Farms, hunting grounds (blacksmith, carpenter)
 
* Blacksmith: Mines (bakery, carpenter)
Start by placing some production - farms, mines, logging and hunting grounds. Then we start placing industry based on what's around; each has high value and a low value industry. The idea is that trading for primary needs is too expensive, but it's ok for secondary needs. Also, there's a penalty to being to close to competition, but that can be overcome with enough resources and demand.
* Carpenter: Logging (bakery, blacksmith)
 
We will also start developing trade routes. We can simulate trade based on need and run my roads algorithm. We can also develop naval travel by developing docks and adding that to the algorithm.
 
From here we can start adding higher culture. Religion, trade and government. Religion will build templates, government will build courts and military bases. Trade will build markets and docks. Markets will form a [https://en.wikipedia.org/wiki/Voronoi_diagram Voronoi diagram] so that each market controls a region and will establish trade routes with all adjacent markets.
 
* Farm: Grasslands based on soil quality
* Foraging grounds: animal life, trees and shrubs
* Logging: trees
* Mines: metal ores
* Bakery: Farms, hunting grounds
* Blacksmith: Mines
* Carpenter: Logging
* Workshop: blacksmith, carpenter
* Markets: roads
* Docks: special parts of road system where roads transition to water
* Temples: markets
* Government: markets and temples
* Military: government
 
Roads are developed from local and trade travel. Local travel represents direct transit like a farm taking goods to either a market or a bakery. It develops roads very slowly. Trade represents travel between markets and produces a much higher rate of development.
 
All structures value bakery, workshop and all cultural buildings because everyone needs food, things and culture.
 
So if this works correctly, it will iterate developing city states. The first passes will create production, then industry. As the local trade networks

Revision as of 18:28, 28 December 2017

Base Units

  • people
  • governments
  • military's
  • religions
  • goods
  • Monuments
  • terrain

Governments rule lands and people. Religions influence people and governments. Governments collect taxes, religion collect tithes. Governments also have military's. Military's enforce laws, protect citizens and fight wars (conquer or protect territory).

https://mewo2.com/notes/terrain/

Goal

The idea I've had is to build a large scale simulator and let it run through a few hundred years. Then go through and extract interesting story lines. This provides the outline of a story. Further, it provides a database of exquisite detail. You can follow a sword starting with the iron that is mined, to the smelter, the weapon-smith, the seller, who carried, which swords were forged before and after, who was slain by it and who was slain while carrying it.

Finally, this outline and these tools can be provided to a few authors and editors. They can add details (like character descriptions). Then each paragraph can be written independently a few times, then those drafts can be combined.

Pipeline

The pipeline allows each pass to be simple and I can replay making sure each improves the process.

Tectonics

Creates the base grid, lays down minerals and igneous rock. Then it creates tectonic plates and shifts the rocks around. Finally it does a rough diamond smoothing pass.

Hydrology

Sets the ocean level so that 1/2 the land is covered by water.

Air currents are established, this can be refined over time to take geography into account, but initially just set alternating bands. Each square has moisture and temperature. If the moisture is less than 100% and the tile has water on it, enough water will evaporate to move 50% of the way to 100%. If the moisture is more than 100%, it will precipitate down to 100%.

The water on the tiles flows and carries sediment. Each tile looks at the previous iteration for inflow. The flow is reduced by a fixed amount (~10%). Then the slope of the tile is used to increase the flow. Tile height is computed by the top of the water, not the top of the land. Outflow can go to 3 tiles at most.

Sediment is determined by flow rate. There's a linear relationship to how much sediment can be carried and how fast the water is moving. Just like humidity, if the rate is too high, sediment is deposited. If it's too low, it's picked up. The sediment composition is also tracked.

I think this is where I should add soil development as well. I won't simulate organisms, but I can use light (at the land surface to exclude deep sea), temperature water and mineral diversity to convert some percent of the surface mineral deposit to soil and track the soil quality. I could add a basic "plants" mechanism to simulate the root systems resisting erosion. I need to think about how to do this, but I think it's something like have a plant mass based on soil, water and temperature. Plant mass absorbs water, reduces flow and reduces erosion. When plant mass decreases, it's translated directly to high quality soil.

Ecosystem

At this level detailed plant growth is tracked and so are individual animals and some evolution.

Each tile contains one "plant", though that may be a single tree or a few meters of grass (I need to decide how big a tile is). I need to figure out plant rules.

Species

Everything has a species - a string that represents what they are. When there's a mutation, there's a chance of the species string changing. Two creatures can only mate if the species string is close.

Grass

Grass trades (evolution) hardiness for ability to spread. There are dials for moisture, temperature and soil quality. A grass tile has a chance to die based on it's hardiness and it's conditions. It also has a chance to spread to any adjacent barren tile. So one species of grass may not be hardy but can spread through temperate climates fast. Another species may be very hardy, but will be slow to spread only dominating the harsher climates. Any time it spreads there is a small chance of mutation.

Shrubs

Shrubs produce berries and the seeds are spread by animals. When a seed lands on a barren or grass tile, it has some chance to spread. It also has a hardiness rating that determines it's odds to grow. The rate of berry production is both genetic and based on light and water. There will be an actual berry count on the shrub, with a max.

Trees

Similar rules to shrubs, but they go through a life cycle. A sapling can easily be killed. An adult tree cannot. Only an adult tree can produce nuts. Trees can hold on to large reserves of nutrients and water, allowing them to survive through brief, harsh weather.

Bee hive

A bee hive increases the reproduction rate of all plants within X tiles. A bee hive will not form within Y tiles of another bee hive. Bee hive has tolerance and random chance of death, it's health is determined by how many plants are near by.

Ruminants

These eat grass. Any tile with a ruminant on it has both a higher chance of death and a higher chance of spreading. Ruminants will have a lot of evolutionary knobs. Size, armaments (antlers), gestation, sociability.

Birds

Similar to ruminants in species and evolution. Birds eat berries from shrubs and nest in trees. A bird cannot nest on a tile with a bee hive. It will eat randomly from berries in range of its nest and deposit seeds randomly in the same range.

A nesting pair will occasionally produce offspring. Once the offspring is grown, it will either seek a nesting spot or a mate (a single with a nest).

Squirrels

Similar to ruminants. A squirrel moves tiles, always staying on tree tiles. It can eat from any tree within X and will can randomly (~1%) plant a tree within the same distance.

Fox

Will eat birds and squirrels

Wolf

Will eat ruminants and foxes.

Disease

Has a virulence, a species key (can affect certain species) and mortality and survival rate. These are different. Mortality is the chance of dying when something is sick and survival is the chance of getting better.

Prehistory

Here we place and grow structures. Any of these structures can take up multiple tiles, but at least one of the tiles needs to touch a "road" tile. Each structure is part of a trade network. So a farm will be connected directly to any bakery or market nearby.

Start by placing some production - farms, mines, logging and hunting grounds. Then we start placing industry based on what's around; each has high value and a low value industry. The idea is that trading for primary needs is too expensive, but it's ok for secondary needs. Also, there's a penalty to being to close to competition, but that can be overcome with enough resources and demand.

We will also start developing trade routes. We can simulate trade based on need and run my roads algorithm. We can also develop naval travel by developing docks and adding that to the algorithm.

From here we can start adding higher culture. Religion, trade and government. Religion will build templates, government will build courts and military bases. Trade will build markets and docks. Markets will form a Voronoi diagram so that each market controls a region and will establish trade routes with all adjacent markets.

  • Farm: Grasslands based on soil quality
  • Foraging grounds: animal life, trees and shrubs
  • Logging: trees
  • Mines: metal ores
  • Bakery: Farms, hunting grounds
  • Blacksmith: Mines
  • Carpenter: Logging
  • Workshop: blacksmith, carpenter
  • Markets: roads
  • Docks: special parts of road system where roads transition to water
  • Temples: markets
  • Government: markets and temples
  • Military: government

Roads are developed from local and trade travel. Local travel represents direct transit like a farm taking goods to either a market or a bakery. It develops roads very slowly. Trade represents travel between markets and produces a much higher rate of development.

All structures value bakery, workshop and all cultural buildings because everyone needs food, things and culture.

So if this works correctly, it will iterate developing city states. The first passes will create production, then industry. As the local trade networks