Advertisement

City Operation Balance

Started by June 30, 2010 12:23 AM
0 comments, last by Katie 14 years, 7 months ago
Hello,

I'm creating the beginnings of a simple city simulation where the city composition affects supply and demand. I'm finding the top-down design process quite difficult because ultimately there will be much more types of commodities and buildings than I can anticipate at this point in time.

Here's what I have so far.

Commodity types: water, food, wood
Unit types: people, livestock
Building types: cistern, farm, or mill

A city has a finite set of land plots that can be purposed by constructing a building on it. Certain land plots are better than others for building on. For example a cistern should be built by a river.

A cistern produces water every month. A farm produces food but requires water. A mill produces wood. Each building must be staffed by 1 laborer in order to produce.

Wood can be burned as fuel. Fuel is required for any kind of manufacturing e.g. ore smelting which will be added later.

Here are the effects of the different commodities:

Water - required to grow food. No water = no food produced in farms.
Food - required to feed people and livestock. No food = production halved.
Fuel - required for manufacturing. No fuel = 0 production in buildings that require fuel.

Now my questions are:
1. How would you go about designing city operation? Ultimately I will have many different commodity types such as weapons, armor, machinery, pottery, jewelry, etc... Likewise, there will be just as many building types which can produce different commodities. Would you prefer an incremental design approach where you start with a minimum set and introduce more? Or would you spend more time designing to come up with a comprehensive but cohesive set?

2. How should I determine the effects of commodities on production? For example the lack of water might affect food production only as described above or I could make water scarcity affect many things. E.g. thirsty laborers are unhappy which results in less production, lack of water makes basket weaving much more difficult, it also reduces the quality of bricks, etc... From a a game design point of view I see two approaches: one where water affects a minimal number of things or two where water has an effect on many different variables. What method do you prefer?

3. Livestock. I could make them a requirement for certain forms of production or I could make them into a force multiplier. In the case of the former I might have two types of buildings: a garden that produces food and requires only human labor and a farm which produces much more food but requires both humans and livestock. In the case of being a force multiplier livestock are optional additions to any building, they require 4x as much food as humans but increase production by 4x. Which approach would you choose and why?
Many of the successful systems like this are emergent. The agents within the system have simple rules, and the results come from the actions of the agents.

Eg, workers can have a thirst. Thirst goes up as they walk around, more as they work. When an agent gets thirsty enough, its desire to earn money will be exceeded by its desire to get water.

So it wanders off looking for a place which advertises drink -- a well or a tavern. Obviously, the longer it takes them to get to the well, the less time they're working.

When they've drunk, their "money" need exceeds their other needs, so they look for a place advertising work which needs doing and start doing it.

The result is the you get the effect of not enough wells affecting productivity without actually needing to write the rules. Similarly, "rest" and houses/inns will work.

Workshops can advertise "swap 1 IRON for X MONEY", and spare workers will decide if they want the money and if so will start delivering iron. As the workshop has enough, it takes the advert down, and now might say "swap WORK for MONEY" instead.

Hence you get the effects of not enough iron being delivered slowing things down, again without needing the rules.


Pathfinding can be a problem because agents need to look for somewhere which is advertising stuff and head for it, but you can do this reasonably simply with a heatmap for each resource. Thirsty agents walk up the gradient to the well. Better wells have higher peaks. Workshops which run out of materials then simply stop attracting agents seeking work, but start attracting agents carrying iron.

Adjusting the heatmaps is easy and can be amortised across many frames. The agents only need to run their AI when their current "task" is finished.


Games like "Settlers" and "The Sims" both utilise these structures underneath.

This topic is closed to new replies.

Advertisement