Design City and Population Simulation

Cpt. Crispy Crunchy

Member
Contributor
Hey guys,

as some of you may know, I applied for the GSOC project Agent based land usage. However, I took the freedom and extended that idea a little bit and ended up with a roadmap to get to growing and evolving cities with their own market, needs and production. This will make room to give player the opportunity to change the development of cities by providing resources, gaining profit from market differences between cities or go rogue and plunder.

As the document grew quit large (around 7 pages concerning core ideas), I made a google doc so everyone can comment and share thoughts presuming he has the patience :D.

To give you the core ideas how I roughly got to this:
1. build cities based on a random starting population.
2. assign squaremeter needs per person per building type and production good type
3. spawn buildings based on probabilities influenced by needs and resource availability
4. if raw resource and production buildings are provided, surpluses will get on the market and lower the price, deficits increase the price
5. npc traders will randomly transport surpluses from one city to deficits from an other city

Here is the doc, feel free to share your thoughts :)

https://docs.google.com/document/d/1YYAKpc-oSMqfP2OeUVmpz0-sExD1UIha86_jXj-oyRo/edit?usp=sharing
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Nice!

Tip: Enable commenting in the GDOC like with GSOC proposals for easy feedback

Additionally / Alternatively maybe split the design into smaller pieces that can be implemented independently and incrementally. Starting on a huge design can be intimidating. Starting and finishing "Implement house spawn at random chance once per newly generated chunk with suitable flat area" as part of a process is way easier :)
 

Cpt. Crispy Crunchy

Member
Contributor
@Cervator thanks for the info :), thought I activated it ouch. Should work now.

The design may be huge but thats more to think of as a helpful motivation as it will hopefully create an enjoyable gameplay.
I added parts of my timeline for more detailed implementation steps and a rough order, at least to a solid starting point.

Ah and if someone knows the minecraft modworld and could tell me if there is already something similar out there, it would be much appreciated :)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Bump. Most the discussion for this is in #citysimulation on Slack, but I thought I'd post here with a nice little (or big) diagram to give it a bit more permanence.

Just today I talked to @Cpt. Crispy Crunchy and mentioned the Holdings concept and its old thread, relating it to other games like Crusader Kings. I've been looking for an elegant hierarchical structure to describe a world including the city simulation stage and I think I came up with a more complete image than in the old thread.

With the hope that it may help support this effort with a nice structural backbone to relate elements to here goes (I have no idea where the stray arrow came from, please ignore!):

Feudalism.png


The center "spine" is vaguely hourglass-shaped on purpose to indicate the higher level features are further apart (empires and continents don't really relate much) with the narrow neck being the interesting parts to our topic here on city generation / simulation. Likewise at the bottom it gets into what you then might use the stuff in said cities for.

Left side has more abstract administrative concepts, right side has physical world concepts. Feudalism is a popular game theme for a fantasy / medieval setting, which could easily be one of Terasology's gameplay settings. But that wouldn't at all be an integral part of city stuff, I just like seeing it all on one chart I could imagine using to design such a gameplay template.

Previously my missing link was connecting the feudalistic layers to holdings properly, and from there into physical objects in the world. The world gen talk on Slack has talked about cities, parcels, lots, buildings, and so on. So here they all are, together at last. Missing is all kinds of added flavor - you don't just have a "Count" you might have a "Countess" or an "Earl" or any kind of cultural variants or made up titles. Totally different cultures could have other layers or be missing some but the structure could probably hold as a design to code from.

What especially helped in connecting the two were "Districts" - in this setup a village or city is a barony-level holding, which is the last abstract layer, it is entirely made up of smaller things from lower layers, namely districts. But districts introduce the first concepts that don't really divide further, like roads or city walls. Similarly districts may be the first layer where there is no obvious noble-type central ruler controlling it, more likely staff typical of whatever flavor the district is. A park may have a top notch lead gardener but he's probably not part of the hierarchical chain of nobility nor living in a mini castle in the park.

You could argue that cities really should deal with walls, and roads connect cities (and in turn counties, duchies, and so on), but really I suspect walls surrounding one or more districts is a better design, especially considering that smaller villages might in turn only have one district (even an undefined default one - no real need to name it if there's only one. Same goes for other layers). Larger cities with multiple districts sometimes have walls inside the city, separating military installations (the central castle), upscale residential quarters, the general population, and even slums (which may even be outside the city proper). A harbor district may be outside the primary wall yet have nautically-adjusted defenses of its own on the water-facing side.

An example covering a few layers - imagine a polytheistic culture structuring its religious facilities / sub divisions:
  • Barony level holding: Monastery. This would be an isolated facility consisting entirely or almost entirely of religious related structures. Think a Tibetan mountain monastery or something like that. It may not have any internal districts, but just a small set of parcels making up distinct blocks of structures, one for housing, one for cooking/eating, one for worship, etc. Each lot within could consist of a dormitory, a shrine, a kitchen building, etc. Probably it would be ruled/led by a single bishop-level figure, or a council, or some other form of ruling body.
  • District: Spiritual Quarter. As part of a larger city with multiple districts this contains temples for the various deities, each getting its own parcel of varying size probably based on importance in some way. Each parcel in turn could be divided into a few lots, one holds a church, another maybe a dojo for a militaristic deity, perhaps even one lot is a sacred pond (the diagram should be taken with a bit of flexibility in mind, couldn't think of a better word than "structure" that could qualify as a category including a sacred pond). Maybe the district even has a central parcel holding a single lot with a giant cathedral dedicated to all the gods at once.
  • Parcel: A residential district still wants to respect the gods. They set aside a single central parcel with a few lots, each lot holds a little temple for the designated deity. Maybe it is right next to a central square (another parcel) with a few other miscellaneous bits like a large fountain (on a lot)
  • Lot: A really pious residential parcel decides even their little street should end in a plot with a small shrine.
A large castle straddling a strategically important mountain pass or river crossing could be an example of a fortification-style barony, and could have its own sub-divisions.

Another highlight for a bit I'm not entirely sure about yet: Rural district directly in a county. Cities (barony layer, between county and district) are likely to have more land than what's inside the walls, much like a plot may have a bit more land than needed to fit its primary structure. Yet a county is big and has a lot of open space - not every farm is necessarily connected directly to a nearby village. More distant farms might just be organized by a local manor, owned by a lord of some sort who is below barony-level. It could be much like a rural district on the outside of a city wall, but maybe it has a single central manor building with some minimal defenses. Over time wilderness could slowly be tamed and such rural districts upgrade into a new barony-level village, a keep or even a bishopric if the pious type. As such the design could allow skipping layers if whatever gameplay setting calls for it, maybe as part of growing new stuff.

A rural district may have parcels being sets of fields with plots for individual fields, each field designated to a specific crop or to lie fallow as part of a crop rotation scheme. If generated outside the control of a city/barony pick one of the central parcels to spawn a manor and a few other buildings to house workers.

In a similar sense maybe larger landscape features could benefit from some similar hierarchy. Counties, duchies, and kingdoms in real history were often shaped by and defined by terrain. Thus the "Region", "Feature" etc on the diagram. Maybe a region is actually what defines the boundaries of a duchy, and a large dark forest in it makes up a county, which in turn has several villages along the edges and maybe one in the very center serving as a crossroads for trade ...
 
Last edited:
Top