Cultura is entering into an alpha state where it'll be playable on a test map. There are a few things I want to get it going:
- Families - Children and Marriage
- Households - Wealth tracking, management and consumption
- Ecology - Renewable resource growth, non-renewable resource mining limitations, climate requirements for plants/animals
- Land Regions - Splitting the map into irregular shapes
Families
Everyone in the game will belong to a family. It's defined as a set of parents, unmarried children and children not of age. It's used to track children and births.
Births are fairly simple. For Cultura, it's a compromise with a game world to give a player more direct input into affecting how fast they can get more children. A family has a single progress bar. When it fills up, the mother becomes pregnant. Then after a set amount of time a new child is born and the progress bar is reset to zero. In order to fill the progress bar, the family must be healthy. The higher the health, the faster the progress bar fills up (excess health fills into the progress bar).
Children stay children for a set amount of time. Then they become unmarried adults. I plan to have a relationship progress for these people and when they achieve it they then marry with someone else who has also filled their relationship bar. This allows the player to have direct impact on the speed of marriage. For instance, holding more festivals and events fills the progress bar faster. For now, once someone is an adult then they will immediately attempt to form a new family with another adult. These two adults are removed from their original families to form a new family as the parents.
In the future I will probably put in a baby time period where the people can do nothing. Then a child time period where they can go to school, play games or sports or apprentice and earn skills and do some amount of labour. And then finally they enter an adult period where they have full labour capacity and end their education and so on.
For now, complicated issues like divorce will not exist. Widows can remarry (they'll count as an unmarried adult).
In code, what will be done is adding a vector of family objects to a faction. Each family object tracks a vector of people for the parent(s), a vector for the unmarried children and a vector for the children. Homosexual families, polygamous families, adoption etc occur through other algorithms. The family class itself will be structured to handle it all in the future. For now though there'll just be vanilla marriage and family fission/fusion (mother/father plus the children). During update tick it would track excess health of the family and put it into the progress bar for next birth. The number of children determines the amount required for the next pregnancy. Homosexual parents would obviously just have zero progress for pregnancy. There is also intended to be future technology (likely medieval age) for contraceptives that would also stall progress. This may be useful if resources become tight.
Households
Separate from families are households. A household is defined as everyone living at the same household. There can potentially be multiple families living in the same household. Each person tracks their living space separately.
Households are important in several ways. A person who crafts any item will do so at their household and thus utilize the industrial improvement of that house. They will also store goods at their house. They also receive benefits from the housing but split across the number of people living there.
I intend to track wealth by household rather than by family. I will have to see whether that makes sense in the future.
People consume goods individually and thus acquire their health and happiness bonus from goods consumption separately.
In code, this means that each person has a reference to a building id which represents their home. When conducting unit actions, such as harvesting or item crafting, they first refer to this building id as their drop off point. If none is available or it is not suitable then they look to public buildings that are nearby.
Ecology
The game currently doesn't replenish resources which is bad news if you actually wanted to play. The update tick functionality needs to take in a game clock of some sort to determine the time of year (and thus the season). As well, plants and animals need requirements such as season of growth or climate required. Animals may have additional requirements. I haven't yet decided whether those requirements should be set in stone (a deer always require pine trees) or have them procedurally generated as the game map is formed (a deer that spawns in a land region with oak trees will have oak trees as a requirement, whereas a deer that spawns in a land region with maple trees has maple trees as a requirement).
During a growth season, a land region tracks the number of plants of a particular type, their growth rate and then adds a certain value back to the land during each update tick. This way if the player changes the number of plants then they also affect the total growth rate. For grasses and bushes (such as wheat or strawberries) each plant can regrow on its own because they are never cut down. Trees on the other hand regrow base on the number of trees still standing and then new saplings only spring up after the existing trees have all grown back to their full amount.
Non-renewable resources don't regrow and their limitation is based on the amount that can be drawn from it at any given time. For instance a single stone deposit may only have 100 stone drawn from it per hour. This can be improved with technology (such as building an open pit mine on the deposit).
Animals have requirements based on the vegetation or animals that exist in a land region. So if a deer requires 5 pine trees, there are 100 pine trees in a land region, then there can be 20 deer. Then additionally, deer are born slowly based on this amount. If you increase the number of pine trees then you also increase the number of deer. The vice versa also applies. This means that deforesting an area also impacts animal numbers.
The UI hasn't been built yet but the land management screen should be colourful and clear about the ecological implications of a player's actions. They need to know the growth rates and animal birth limits, as well as what affects them. After that the game has no restrictions. You can ecologically destroy the world if you want.
In code, the update tick needs an optional parameter for the terrain manager to take in the game clock. Well, the game also needs a game clock! While it has a clock in general it doesn't track the time of year and reset to zero each new year.
Land Regions
Land regions define an irregular shape of land for several in-game purposes. The first is the plants and animals. Each land region has its own set of plants and animals. One land region might be pine and deer. Another might be pine and rabbits. Taking different land regions means gaining access to different types of plants and animals. However, the game is designed so that you can play with an incomplete set of resources and simply trade with other players for what you don't have.
Second is that these help to define interesting borders. When you take a land region you own that area and others may not enter without eliciting some political consequences.
Third are roads. I intend to make pre-set roads between neighbouring land regions. These roads can eventually be improved with technology. They start as nothing but are coded into the game so that when people want to travel to another region or deliver goods somewhere, they take that path and not a random path.
Fourth is climate. A land region can have a custom climate. I won't make it too complicated at first. Maybe just cold, temperate and hot. Plants and animals will have climate requirements and if they are in a land region that has the wrong climate they won't grow or grow at a penalty.
In code, I will probably have the terrain manager keep track of these land regions. Being irregularly shapes makes their definition difficult. My current compromise is for a land region to be comprised of a set of rectangles. In order to test if a particular square in the game exists in a land region, it is tested against that set of rectangles. That is a relatively quick test that may take upwards to 5-10 such checks. It depends on how crazily shaped I want land regions. The rest of the data that may exist are perhaps a set of "roads" (set paths in the game for units to take), the climate and also the plants/animals that exist. I may even shove some graphic variables in there (the static geometry of the trees and so on) since I don't currently have a graphics module in my engine (woe is me).