Province-Based Turn-Based Strategy Games: A System Design Guide

    A maintainable turn-based strategy engine needs explicit world state, action constraints, and turn resolution rules. This guide covers province graphs, order queues, economy and population models, diplomacy, combat, fog of war, technology, campaign data, and deterministic testing, showing how to keep gameplay consistent, extensible, and explainable.

    The appeal of turn-based civilization strategy lies less in spectacular individual actions than in choices constrained by resources, population, geography, and diplomacy. Building this gameplay into maintainable software requires more than adding interface buttons: the engine must clearly define its world state, legal actions, and resolution order.

    The following design breaks the system into implementable boundaries without tying it to any particular commercial game.

    Define the Domain Objects First

    Treat each game session as a serializable world snapshot. Core entities should include civilizations, provinces, units, buildings, technology progress, diplomatic relationships, strategic resource inventories, and the current turn number.

    A province is the smallest territorial unit. It has an owner, population, output, neighboring provinces, and building slots. A civilization has a capital province, a government type, unlocked technologies, and its own visible information. Units do not directly determine victory or defeat; they carry out orders.

    Model the capital as a reference on the civilization rather than hard-coding it into a province type. Relocating a capital or capturing it then becomes a matter of updating references and timers.

    A common rule eliminates a civilization after an enemy has continuously occupied its capital for a specified number of turns. Implement this as a configurable threshold—for example, three turns by default—and update or reset the timer during turn resolution. Do not scatter the threshold across UI logic.

    Population and the economy should remain separate ledgers. Population determines recruitment limits, provincial stability, and some building maintenance costs. The economy determines how much can be spent on orders during the current turn. They can influence each other, but combining them into a vague pool of “points” makes rejected orders difficult to explain later.

    Queue Orders Instead of Changing State Directly

    Every player action should enter an order queue: movement, recruitment, construction, disbanding, declarations of war, alliances, treaties, annexation, or releasing vassals.

    Perform only static validation when an order is submitted. Execute orders in a fixed priority sequence during turn resolution. This supports planning before resolution and makes replay and reconnection easier.

    A recommended resolution sequence is:

    1. Income and maintenance
    2. Technology and government changes taking effect
    3. Diplomatic changes
    4. Movement and combat
    5. Occupation timers
    6. Building effect updates
    7. Visibility recalculation
    8. Victory and defeat checks

    Tactical discussion becomes meaningful only when this sequence is public and stable. If combat occurs before income is processed, players cannot use the current turn’s military budget to judge whether they can deploy forces, making the rules feel arbitrary.

    Illustrative validation can remain small:

    1. fn can_enqueue(order, world) -> Result:
    2. require order.actor is alive
    3. require cost(order) <= treasury(order.actor)
    4. require pop_ok(order, world)
    5. require adjacency_or_port(order, world)
    6. require diplomacy_allows(order, world)
    7. return ok

    Return stable error codes for rejection reasons, such as insufficient funds, insufficient population, nonadjacent destination, unavailable sea route, treaty restriction, or an eliminated target. The UI should display these results, not invent a second set of rules.

    Maps, Adjacency, and Sea Routes

    The province map is fundamentally a weighted undirected graph, with a few connections potentially represented as directed edges, such as one-way straits or mountain passes.

    Earth, a single continent, and a fictional planet should be different datasets using the same graph structure—not three separate codebases.

    Maps may contain hundreds of provinces. Slow loading usually comes from parsing all campaigns, textures, and saves at once rather than from the graph algorithms themselves. Separate map geometry, province attributes, and campaign scripts. Load them on demand and build adjacency indexes for frequently accessed provinces.

    A port is a modifier that enables sea connections, not a special unit type. Without a port, sea-adjacent connections are unavailable to land units. With a port, those connections become part of the movement graph.

    Fortresses modify defensive combat calculations, while watchtowers modify visibility range. Implement buildings as lists of modifiers applied to rule functions so that adding a building does not require changing the main movement loop.

    A custom map is validated graph data. Validation should check that:

    • Province identifiers are unique.
    • Adjacency references point to existing provinces.
    • The required capital candidates are present and can be assigned.
    • Resource locations fall within valid map bounds.

    Import failures should identify province-level errors rather than report only that the file is corrupt.

    Economy, Population, and Expansion Constraints

    The statement that all orders are constrained by the current economy and population needs explicit formulas. A simple, explainable model is:

    • Turn income = base provincial output + building contributions + resource contributions + treaty modifiers − military and building maintenance
    • Recruitable population = total population of controlled provinces × mobilization coefficient − population committed to active units
    • Expansion does not automatically increase income. Newly acquired provinces may generate negative output for several turns to represent post-occupation instability.

    Military expansion, research, and domestic construction compete for the same budget. That competition creates strategic depth.

    Do not quietly refund money or replenish population during combat resolution merely to improve the feel of the game. Such adjustments can cause replay and multiplayer state to diverge. If difficulty settings are needed, change the mobilization coefficient or maintenance multiplier and store those values in campaign configuration.

    Vassalage and annexation must have different sovereignty rules. A vassal remains an independent civilization, but its diplomacy and visibility are constrained by its overlord, and it pays a share of its income as tribute. Annexation transfers province ownership to the overlord and starts an occupation stabilization period.

    Define prerequisites, cooldowns, and failure rollback behavior for both operations in the same diplomacy rule table. Otherwise, the UI may offer actions that have no defined resolution behavior.

    Combat, Tactics, and Capital Occupation Timers

    Units may move only to adjacent provinces in the current movement graph or along sea routes enabled by ports.

    A cautious advance can emerge from ending movement in friendly fortified provinces and postponing attacks until the next turn. Guerrilla tactics can emerge from using inexpensive units to gain visibility and disrupt resource provinces instead of immediately attacking the capital.

    These should not be mutually exclusive scripts. They should be outcomes of the same order system under different modifiers.

    The capital occupation counter increases only if the capital is still controlled by an enemy at the end of the resolution phase. Recapturing it before that point resets the counter.

    Civilization elimination must be atomic:

    • Its provinces become unowned or transfer according to campaign rules.
    • Its units are disbanded.
    • Its treaties become invalid.
    • Other civilizations’ visibility caches are invalidated.

    If elimination is processed in multiple steps and the game can be saved between them, inconsistent states can appear—for example, an eliminated civilization that still collects taxes.

    Fog of War and Information Boundaries

    Fog of war is not simply a black overlay on the map. It is a separate visibility set for each civilization. Three modes are sufficient for a basic implementation:

    • Standard: Explored provinces retain terrain information, while enemy units are hidden in areas that are not currently visible.
    • Full fog: Only adjacent provinces and areas within watchtower range are visible. Information expires when visibility is lost.
    • Fully revealed: All units are visible to every civilization, intended for debugging or tutorials.

    Watchtowers, shared allied vision, and treaty-based mutual reconnaissance all add provinces to a civilization’s visibility set.

    The server or local rules layer is the sole source of truth. Clients render only the subset visible to their civilization. Otherwise, players may inspect memory or replay data to discover units in unexplored areas, undermining the information rules.

    Technology, Government, and Strategic Resources

    The technology tree is a directed acyclic graph. Nodes unlock rule modifiers, not merely descriptive text.

    For example:

    • Metallurgy technologies enable higher-tier military units.
    • Currency technologies unlock market buildings and modify the income formula.
    • Engineering technologies enable roads that reduce movement costs on specific edges.

    Government reform is a special node. Once prerequisites involving public support, territory, or technology are satisfied, a civilization can switch from monarchy to republic and replace a set of modifiers affecting taxation, diplomatic trust, and recruitment costs.

    Apply the change at a turn boundary so that two different sets of formulas are not used within the same turn.

    Strategic resources are modeled as stockpiles or per-turn production associated with provinces. Horses can be prerequisites for cavalry recruitment, iron for weapon upgrades, and silk a modifier for diplomatic trust or treaty costs.

    When a resource province is captured, previously upgraded units do not need to be downgraded immediately. New orders, however, must recheck their prerequisites. This preserves the value of conquest without allowing a temporary supply interruption to destroy an entire army and make the game state difficult to interpret.

    Campaigns Are Data, Not Code Branches

    A modern-world scenario, an earlier historical setting, and a more recent conflict should all be initial snapshots running on the same engine. Each snapshot defines:

    • Which civilizations exist
    • Initial province ownership
    • Unlocked technologies
    • Starting diplomatic relationships
    • Resource distribution
    • Victory conditions

    Victory conditions may require surviving until a specified turn, controlling a given proportion of provinces, or completing scenario objectives.

    With a data-driven design, changing a scenario’s historical starting point does not require a code release. The engine only needs to ensure that snapshots pass invariant checks: every surviving civilization has exactly one capital, technology prerequisites are acyclic, and incompatible diplomatic states cannot coexist—for example, war and alliance between the same parties.

    Achievements should likewise subscribe to domain events, such as crossing the sea for the first time, completing a government reform under population pressure, or ending a war through vassalage rather than annexation.

    Achievement checks read the event stream; they should not call back into gameplay rules. Otherwise, achievement code can become a second resolution engine.

    Consistency, Performance, and Testability

    Long loading times and missing national policy options are often content-pipeline problems.

    Policies, technologies, and buildings should come from the same manifests used to generate the UI. Maintaining one list manually in the interface and another in the rules tables invites missing options.

    At startup, load only the subset referenced by the current campaign, and move validation into the packaging stage.

    Turn-based systems are well suited to deterministic testing. With a fixed random seed, the same sequence of orders must produce the same snapshot hash.

    Core invariants include:

    • Economic values are never undefined.
    • Population usage is never negative.
    • Eliminated civilizations no longer generate orders.
    • Units outside an opponent’s visibility do not appear in that opponent’s visible events.

    Checking these invariants at the end of every turn resolution is cheaper than recovering corrupted saves from player reports after release.

    For cross-device continuation, save the world snapshot, order log, and rules version. If saves use object storage or a database in a public cloud, rely only on generic upload, read, and version-control capabilities. When rules versions are incompatible, reject silent migration.

    Do not embed a particular UI skin or distribution-channel package name in the save format. Doing so ties content updates to client-specific branches.

    Keep the Implementation Boundaries Clear

    These systems most often become unmanageable when historical terminology is implemented as special-case code.

    A more reliable approach keeps history in campaign data and descriptive text. The rules layer retains only provinces, orders, constraints, visibility, and modifiers.

    When a new tactic is needed, first consider adding a building modifier, changing an edge weight, or introducing a diplomatic state rather than copying a combat function.

    This allows the same engine to support tutorials, large world maps, and maps drawn entirely by players. More importantly, every unsuccessful action or turn outcome can be explained by a published constraint rather than a hidden script.