Wednesday, January 31, 2018

Making History

The next phase of the planet simulation involves the history of people on a smaller scale. First, every terrestrial hex tile is subdivided by two levels, from its prehistorical status,

Sphere of coarse hexes shaded according to population levels

to a view with national boundaries along finer boundaries (two "steps" finer, roughly 120km apart, versus the coarser tiles separated by about 365km):

Sphere of finer hexes, with distinct nations colored like a map

The next step is populating each tile with flora and fauna, based on the local climate (lighter tiles support more species):

Sphere with yellower tiles over more temperate regions

Nations are created by picking random capital tiles probabilistically based on the tile's characteristics (climate, whether its population is agricultural or not), then assigning other tiles to a capital based on proximity modified by local concerns (mainly terrain features, like what Martin O'Leary describes here).

Each nation gets its own language, currently just a word for each species within its bounds; they evolve through sound changes and borrowing words from other languages (through trade or conquest). There's a separate mode to play with languages:

Interface with tools for applying sound changes to languages

As time advances (also on a smaller scale, 25 years or a single human generation, per tick), nations trade with neighbors when they can benefit mutually, merge together when one has the strength and reason to take over another, and split up when they get too big. Languages borrow words for species as they encounter them (through trade or expansion).

Here's the same world from before, 450 years later:

Planet with one large nation and many small ones

The yellow highlighted area shows one huge nation that's selected, with part of its language visible in the detail panel on the bottom. Dark green tiles are boundaries between nations with trade relationships and dark red ones represent unresolved conflicts.

Code here.