Sub topic 10
Worked Example: From a Design Goal to Rules
Assume you know the basics of game rules and game state. You should also be comfortable distinguishing a rule from what happens when players use it. Python is optional.
A designer usually starts with an intended aesthetic, or player experience. Suppose the goal is:
> Create a racing game that feels tense because the lead can change until the finish.
“Tense” is an aesthetic response. The player should feel challenge and uncertainty. The desired dynamics, or behavior during play, might be:
- Racers change positions several times.
- A trailing racer can recover from a mistake.
- A strong player can still win through skill.
- The final gap stays small often enough to create suspense.
These dynamics suggest possible mechanics, which are the rules, data, and algorithms that control the game:
- Each racer has a base speed.
- Random events slightly vary speed.
- A racer behind the leader receives a small speed bonus.
- The bonus has a maximum value.
- The race ends after a fixed distance or time.
The mechanic must support the dynamic without removing meaningful skill. If the catch-up bonus is too strong, position changes may happen often, but winning can feel arbitrary.
Trace the design chain
The following chain keeps the layers separate:
design_chain = {
"aesthetic_goal": "challenge: close, tense races",
"target_dynamics": [
"lead changes happen often",
"no player is ever hopelessly behind",
],
"candidate_mechanics": [
"catch-up speed boost for trailing racers",
"item drops weighted toward trailing racers",
],
}
for layer, value in design_chain.items():
print(layer, "=", value)The candidate mechanics are hypotheses, not proven solutions. A designer can test each one and ask whether it creates the intended behavior.
A simple catch-up rule can be written as follows:
def racer_speed(base_speed, gap_behind_leader,
boost_per_unit=0.05, max_boost=0.3):
"""Return speed after applying a capped trailing-racer boost."""
gap = max(gap_behind_leader, 0.0)
boost = min(gap * boost_per_unit, max_boost)
return base_speed * (1 + boost)
print(racer_speed(10.0, 2.0))If the gap is 2 units, the boost is 10 percent. If the gap is very large, the boost stops at 30 percent. This cap protects the leader’s advantage and prevents the rule from guaranteeing a comeback.
Follow the feedback loop
The catch-up rule creates a negative feedback loop. Here, “negative” means that the rule reduces an increasing difference. A racer falls behind, receives a bonus, and may close the gap. The smaller gap then reduces the bonus.
This differs from a positive feedback loop, where an advantage creates more advantage. For example, a racer who earns coins that permanently increase speed may pull farther ahead, making later rewards easier to collect.
Tune the rule
Change one parameter at a time. Increasing boost_per_unit makes recovery faster. Increasing max_boost allows larger comebacks. Either change can also make the leader’s decisions feel less important.
| Parameter | Higher value tends to produce | Possible cost |
|---|---|---|
| `boost_per_unit` | Faster recovery from small gaps | Less value in gaining a lead |
| `max_boost` | More dramatic comebacks | Outcomes may feel random |
| Race length | More time for position changes | Slower pacing |
Exercise
A race has many lead changes, but players say their choices do not matter. Which parameter or rule would you inspect first, and why?
Show answer
Inspect the catch-up boost, especially its maximum. Reduce it or make it depend on a smaller gap so recovery remains possible without erasing skillful leads.