Sub topic 1
Seeing a game as a system
A game is more than a list of rules, art and content. While it runs, it is a machine that takes your actions as input and keeps changing its own state. This chapter gives you the vocabulary to describe that machine. Later chapters use it to explain why some games snowball and others stay tense until the last turn.
Prerequisites
This chapter assumes you have:
- Played a few common game types, such as strategy, racing, card or board games, and can describe their basic rules.
- Basic comfort with arithmetic formulas and percentages.
- Optionally, enough Python to read a short function and a
forloop. The code is small, and you can follow the chapter without running it.
No earlier chapter is required, because this is the first one.
What "system" means here
In this tutorial, a system is a set of connected parts whose interaction produces behavior that none of the parts has alone. A single rule, such as "a settlement produces 3 gold per turn", says little about how a match will go. The match emerges from many rules acting on one shared state over time.
A game system has four ingredients:
- State. Everything the game remembers right now: resources, positions, health, scores, cards in hand, whose turn it is.
- Rules. The procedures that change the state, such as production, combat resolution, scoring and spawning.
- Player actions. The choices the rules allow. These are the inputs from outside the system.
- Feedback to the player. What the player can see or sense about the state, such as a health bar, a leaderboard or the position of rivals.
The fourth ingredient closes the circle, and the rest of this tutorial builds on that. The player acts, the rules update the state, the player perceives the new state, and the next action depends on what was perceived. That circle is the core of every game.
Why the circle matters
If a game were a straight line, with an action followed by a result and nothing else, you could judge each rule on its own. Because the output of one step becomes the input of the next, small effects can compound or cancel.
Consider a strategy game where gold lets you build a mine, and the mine produces more gold. The result of your action (a mine) changes the state (more income), and the new state makes the same action easier next turn. Now consider a racing game where the player in last place gets a stronger item. Falling behind changes the state (your position), and the rules respond to that state by helping you. Both games contain a circle from state back to state, but the circles behave in opposite ways. Telling them apart is the main skill this tutorial teaches.
A first look at stocks and flows
To describe state precisely, system thinkers split it into two kinds of quantity. A stock is an amount that accumulates and persists between turns: gold in your treasury, hit points, units on the map, points on the scoreboard. A flow is a rate that adds to or drains a stock: income per turn, damage per hit, units trained per round, upkeep paid each turn.
A bathtub is the usual picture. The water level is the stock, the tap is an inflow and the drain is an outflow. You cannot change the level directly. You can only change the flows, and the level responds over time. The next chapter covers this in detail. For now, remember that stocks hold the game's history and flows change it. A game that feels "sticky", where early mistakes keep mattering, is one whose stocks hold on to the effects of past choices.
Reading a game as a system: a worked method
You can apply this to any game you play. Pick one mechanic and answer these questions in order:
- What is the state that matters most for this mechanic? Name the stocks.
- What changes each stock? List the inflows and outflows.
- What does the player do that adjusts those flows?
- What can the player see about the stocks?
- Does any stock influence its own inflow or outflow, directly or through other stocks?
Question 5 is the one that matters most. When the answer is yes, you have found a loop.
The table applies the method to three familiar games.
| Game | Key stock | Inflow | Outflow | Player action | Does a stock affect its own flow? |
|---|---|---|---|---|---|
| Real-time strategy | Gold | Workers mining | Buying units and buildings | Build more workers | Yes: more workers produce more gold, which buys more workers |
| Racing with items | Distance behind the leader | Slower speed | Boost and strong items | Use items, take shortcuts | Yes: a larger gap triggers stronger items, which shrink the gap |
| Roguelike dungeon | Hit points | Potions and resting | Enemy damage | Fight or retreat | Partly: low hit points push the player to play cautiously, which reduces damage taken |
The third row shows that a loop can pass through the player's own judgment. The rules do not have to contain the loop. A player who sees a red health bar and retreats has closed the circle.
A minimal system in code
The following program is a toy version of the loop above. Each turn, a simple player policy chooses an action, the action changes the state, and the rules then add income. Nothing here is a loop-analysis tool. It only makes the cycle concrete.
state = {"gold": 10, "fields": 1}
def choose_action(state):
# Player policy: the decision depends on what the player can see.
return "buy_field" if state["gold"] >= 10 else "wait"
def apply_action(state, action):
if action == "buy_field" and state["gold"] >= 10:
state["gold"] -= 10
state["fields"] += 1
def apply_rules(state):
# Rule: each field produces 3 gold per turn.
state["gold"] += 3 * state["fields"]
for turn in range(1, 7):
action = choose_action(state)
apply_action(state, action)
apply_rules(state)
print(turn, action, state)Running it prints:
1 buy_field {'gold': 6, 'fields': 2}
2 wait {'gold': 12, 'fields': 2}
3 buy_field {'gold': 11, 'fields': 3}
4 buy_field {'gold': 13, 'fields': 4}
5 buy_field {'gold': 18, 'fields': 5}
6 buy_field {'gold': 26, 'fields': 6}Look at how the four ingredients appear. state is the state. apply_action and apply_rules are the rules. choose_action stands in for the player. Because choose_action reads state, information flows back to the player.
The stocks are gold and fields. Income is a flow that depends on fields, and fields is raised by spending gold. So the stock fields ends up controlling its own growth. After the first purchase, the player buys a field on most turns, and the pace of growth rises. This is the kind of circle later chapters call a reinforcing loop.
Where the boundary of the system goes
Deciding what belongs inside the system is a design choice, and it changes what you can explain. Three common boundary decisions come up:
- Include the player's psychology or not. A rule that gives bonus points to a trailing player is easy to model. A trailing player who gives up and quits is harder to model, but it can decide whether the game works. Treat the player as part of the system when their reaction is what closes the loop.
- Include other players or not. In a multiplayer match, an opponent's stock is part of your state. Your gold matters mostly relative to theirs, so many loops depend on comparisons, not on absolute values.
- Include time or not. Some effects take several turns to appear, such as building a unit that takes three turns to train. If you ignore the delay, you may predict a smooth result when the real game oscillates. Delays get their own chapter.
Common errors when first analyzing a game
- Listing rules instead of stocks. "Players get a bonus for capturing towers" is a rule. The analysis starts when you ask what that bonus adds to, and what that stock then affects.
- Treating a flow as a stock. Income per turn is a rate. Gold in hand is an accumulated quantity. If you mix them, you will predict instant changes where the game actually changes gradually.
- Assuming the loop is in the rules. Some of the strongest loops run through player behavior, such as spending, risk-taking and giving up. Check what the player can see and how they are likely to respond.
- Judging a mechanic in isolation. A rule that looks harmless alone can combine with another rule to produce strong behavior. Always ask what else reads or writes the same stock.
What comes next
You now have a working vocabulary. A game is a state, a set of rules, player actions and information returned to the player. State is held in stocks and changed by flows. A loop exists wherever a stock helps determine its own flows. The next chapters name these loops precisely, separate the ones that amplify change from the ones that resist it, and show how to measure and tune them.
Exercise
Choose a game you know and describe one mechanic as a system. Name the main stock, at least one inflow and one outflow, what the player can see about the stock, and whether the stock influences its own flows.
Show answer
A sample answer for a card game with a life total. The stock is life points. The inflow is healing cards. The outflow is damage from opponent attacks. The player sees the life total on screen. Low life changes player behavior, because the player plays defensive cards, which lowers incoming damage. So the stock does influence its own outflow, through the player's decision. Any answer is correct if it names a stock and its flows, identifies what the player can see, and gives a justified yes or no for the self-influence question.
Exercise
In the code example, change the income rule so each field produces 1 gold per turn instead of 3. What happens to the player's behavior over the first six turns, and which part of the circle changed?
Show answer
Income falls, so gold stays below 10 for longer and the policy chooses "wait" more often. Fewer fields are bought, which lowers income further, so growth is much slower. Only the rule (the flow rate) changed. The state, the player policy and the information path are the same. This shows that a small change to one flow can change the whole sequence, because the result feeds back into the next decision.