Sub topic 3
Opportunity cost: what you give up
This chapter assumes you know basic game design vocabulary (mechanics, resources, player goals) and have played a range of video or tabletop games. The Python examples are short, and you can skip them without losing the argument.
What opportunity cost is
Opportunity cost is the value of the best option a player gives up when they pick another one. In a game, every choice has a price, and the price is whatever the player could have done instead.
A shop price is not the same thing. If a sword costs 50 gold, the 50 gold is a visible cost. The opportunity cost is the best thing those 50 gold could have bought otherwise, such as armor, a healing potion, or a savings buffer for next level. The same sword costs more to a player who badly needs armor than to a player who needs nothing else.
Opportunity cost is the mechanism that turns "I can pick any of these" into "I must pick one." Without it, a choice is just a list of free things. The previous chapters defined a meaningful choice as one where the player has agency, the choice has consequences, and the player can see those consequences. Opportunity cost is how most of those consequences get created: picking A means B does not happen.
Why it matters for design
Three properties follow from opportunity cost.
- It makes choices felt. If the player can have everything, nothing they pick says anything about them. When they must forgo something they wanted, the pick reveals a priority.
- It makes choices comparable. The player weighs options against one another. The weighing is the decision.
- It creates regret and satisfaction. A player who gave up something attractive remembers it. That memory is part of why the game feels like it was theirs.
Opportunity cost also gives you a diagnostic question to ask about any decision in your game: "If the player takes this, what are they not taking?" If you cannot answer, the choice may be free, and a free choice is not a meaningful one.
Where opportunity cost comes from
Opportunity cost exists only when something prevents the player from doing both. You can list the common sources of that prevention.
| Source | What blocks "both" | Example |
|---|---|---|
| Limited resources | A shared pool runs out | Gold, mana, ammunition |
| Limited time | Only so many turns or minutes | A turn-based action budget, a timer |
| Limited slots | Only so many places to put things | Inventory, equipment slots, a deck size cap |
| Mutual exclusion | Picking one locks out another | Choosing a class or a faction |
| Limited attention | The player cannot watch everything | Managing several fronts in a strategy game |
Scarcity, covered in a later chapter, is the umbrella for most of these. Here the point is narrower: the block is what creates the cost. Remove the block and the cost disappears.
Time and action economy
Action economy is the number of actions a player gets in a period, set against what they could do with them. A turn-based game that gives you two actions per turn creates opportunity cost between every pair of things you might do. Attacking now means not healing now. In real-time games the same effect comes from the clock and from your character being in only one place.
Slots and capacity
A fixed number of slots turns a collection into a decision. If a player has four ability slots and ten abilities, each slot holds one ability and excludes nine others. Slots are often the cleanest way to create opportunity cost because the limit is visible and the options are concrete.
Visible and hidden costs
A cost can be visible, hidden, or implied.
- Visible cost. The price is stated. "Costs 3 mana."
- Implied cost. The price follows from a limit the player already knows about. Spending your last turn's action means you cannot respond to a surprise.
- Hidden cost. The player does not learn the price until later. Skipping a side quest that, unknown to the player, held the only way to recruit an ally.
Hidden costs deserve care. A player can only make a meaningful choice if they can judge, at least roughly, what they are giving up. If the cost is entirely hidden, the choice feels arbitrary, and a later reveal feels like a punishment rather than a consequence. Later chapters cover information and telegraphing in detail. For now, treat it as a rule of thumb: the player does not need to know the exact price, but they should know a price exists.
A worked example: the shop
Consider a small shop. The player has 10 gold and can buy any combination of items.
| Item | Cost | Effect |
|---|---|---|
| Potion | 4 | Restores 20 health |
| Shield | 6 | Blocks 3 damage per hit for one fight |
| Bomb | 5 | Deals 15 damage to all enemies once |
| Map | 3 | Reveals the next room |
With 10 gold, the player can afford several combinations. Each combination excludes others, so the choices carry opportunity cost.
| Purchase | Gold spent | Gives up |
|---|---|---|
| Potion + Shield | 10 | Bomb, Map |
| Potion + Bomb | 9 | Shield, Map (1 gold unspent, Map costs 3) |
| Potion + Map + 3 gold saved | 7 | Shield, Bomb |
| Shield + Map | 9 | Potion, Bomb |
Notice a few things.
- Buying the Potion and Shield uses every coin. Its opportunity cost is the best alternative use of those 10 coins, which depends on what the player expects to face.
- Leftover gold is not wasted. Saving is itself an option, and what it gives up is whatever the unspent gold could have bought now.
- The shop only works if the items are comparable in usefulness. If the Bomb were strictly better than the Shield at a lower price, nobody would buy the Shield. That failure is the subject of the dominant strategy chapter.
You can check the combinations with a short script. It lists every affordable set of items and the total spent, which shows how many distinct sacrifices the shop forces.
from itertools import combinations
ITEMS = {"Potion": 4, "Shield": 6, "Bomb": 5, "Map": 3}
BUDGET = 10
def affordable_baskets(items, budget):
names = list(items)
baskets = []
for size in range(1, len(names) + 1):
for combo in combinations(names, size):
total = sum(items[n] for n in combo)
if total <= budget:
baskets.append((combo, total))
return baskets
for combo, total in affordable_baskets(ITEMS, BUDGET):
left_out = [n for n in ITEMS if n not in combo]
print(f"{' + '.join(combo):<22} spends {total:>2} leaves out {left_out}")Running it shows that no basket contains all four items. That is the shop's opportunity cost in concrete form: there is no purchase that avoids a sacrifice.
Making the cost meaningful rather than merely present
A cost can exist and still fail to matter. Four common problems follow.
The cost is too small
If the player can recover what they gave up almost immediately, the choice is cheap. A weapon swap that takes no time and costs nothing means the player simply uses whichever weapon fits the moment. The decision exists, but it is trivial.
The cost is too large
If every choice is a disaster, players freeze or consult a guide. High stakes are fine when the player can reason about them, but a cost so large that one wrong pick ends the run punishes experimentation.
The cost is the same for everyone
Opportunity cost is meaningful when it varies with the player's situation. A healing potion is worth more when you are low on health and less when you are not. If an option is always the right pick regardless of circumstance, it is not trading off against anything, because the alternatives never win.
The sacrificed option is never attractive
If the thing you give up is always weak, giving it up costs nothing. Opportunity cost depends on the best forgone option, so the alternatives must be worth wanting. A choice between a strong item and three useless ones has no real cost on the strong pick.
Opportunity cost across time
Costs also compound over a game. A choice made early removes options later.
- Spending now versus saving. Using a resource on a small gain gives up a larger gain you could have afforded after saving. This is a time-based opportunity cost.
- Specialization. Investing points in one skill tree leaves fewer points for others. The cost grows with each additional point.
- Sequence. Doing task A before task B can change what B offers, so order itself is a choice.
Players who reason well about these costs feel clever. Players who cannot see them feel lost. Showing future consequences, through preview screens, respec previews, or visible skill trees, makes long-term costs readable without removing them.
Checking opportunity cost in your own design
Run through these questions for each decision point.
- What resource, slot, or time does this choice consume?
- What is the best alternative use of it?
- Is that alternative attractive in at least some situations?
- Can the player see, or reasonably guess, what they give up?
- Does the cost change with the player's situation?
If the answer to question 2 is "nothing," the choice has no cost. If the answer to question 3 is "never," the cost is nominal. If the answer to question 4 is "no," the choice may feel arbitrary. If the answer to question 5 is "it never changes," look for a dominant option, which the later chapter on dominant and dominated options explains how to detect.
Common errors
- Adding costs without limits. Putting a price on an item does not create opportunity cost if the player has more currency than they can spend. Scarcity has to back the price.
- Making the sacrifice invisible. Players cannot weigh what they cannot see. Show the alternatives at the moment of decision.
- Letting the player undo everything. Free, instant refunds remove the cost. Some reversibility is good, but if undoing is free, the choice was never a commitment.
- Balancing only the price. Equal prices do not make equal options. Compare what each option delivers per unit of the scarce resource.
Exercise
A player has 8 gold and three items to choose from: a Sword (cost 5, strong attack), a Bow (cost 5, strong ranged attack) and a Rope (cost 1, rarely useful). They can afford the Rope together with either weapon. Describe the opportunity cost of buying the Sword, and say whether the Rope adds a real choice.
Show answer
Buying the Sword uses 5 of the 8 gold and excludes the Bow, because both weapons together cost 10. The opportunity cost of the Sword is therefore the Bow, the best forgone option, and the choice is real if the Bow is attractive in some situations. The Rope adds no real choice. It costs 1 gold, fits with either weapon, and the player can always afford it, so buying it gives up nothing of value.
Exercise
A designer lets players swap their four equipped abilities freely during combat at no cost. Explain why this weakens opportunity cost, and suggest one change that restores it without removing the swap feature.
Show answer
Free instant swapping means the player never gives up an ability, because they can bring back any ability the moment it is needed. The slot limit then forces no sacrifice. To restore the cost, add a price to swapping, such as a cooldown, a resource cost, a lost turn, or a restriction to safe areas. Any of these makes the player commit to a loadout for some period, so equipping one ability excludes others during that time.