Sub topic 12
Delays and Oscillation
Prerequisites and the core idea
Assume you know basic game genres, percentages, and simple arithmetic. You should also recognize a stock, such as a player's score, and a flow, such as points gained per turn.
A feedback loop becomes harder to predict when its response is delayed. A delay means that the system reacts to an older state instead of the state that exists now. In a game, this might happen because:
- A catch-up bonus is calculated at the start of a round.
- A unit's order takes time to reach the battlefield.
- A player sees a warning only after a sensor updates.
- A card effect applies after several turns.
Delays are especially important in negative, or balancing, feedback. Balancing feedback tries to reduce a gap. With no delay, a correction can move smoothly toward the target. With too much delay, the correction can overshoot the target. The next correction then pushes in the opposite direction. This repeated overcorrection creates oscillation.
Oscillation is repeated movement around a target. A racing game might alternate between “Player A is ahead” and “Player B is ahead.” A strategy game might repeatedly swing between too many and too few resources.
A delayed catch-up loop
Consider two racers. The game gives the player who is behind a speed bonus, but it calculates the bonus using the standings from the previous round.
def delayed_gap(rounds, catch_up=0.6):
gap = 10.0
previous_gap = gap
history = [gap]
for _ in range(rounds):
correction = catch_up * previous_gap
gap -= correction
previous_gap = gap
history.append(round(gap, 2))
return history
print(delayed_gap(8))Here, gap is the stock being changed. The catch-up correction is a flow that reduces the gap. previous_gap represents the information delay.
This small model is intentionally simple. If the correction is too strong, the gap crosses zero. A negative gap means the former trailing player has moved ahead. If the system keeps applying corrections based on old information, the lead can swing back and forth.
| Loop condition | Likely behavior |
|---|---|
| Small correction, short delay | Smooth approach toward balance |
| Strong correction, short delay | Fast approach, possibly slight overshoot |
| Strong correction, long delay | Large overshoot and oscillation |
| No limit on correction | Unstable or extreme swings |
Reading the loop
The loop's sign is still balancing: a larger gap produces a correction intended to make the gap smaller. The delay changes its timing, not its basic purpose. However, timing can change the result so much that players experience the mechanic as unstable.
A practical fix is to reduce correction strength, shorten the delay, or add damping. Damping means reducing later corrections after an overshoot. A cap can also prevent one update from reversing the entire lead.
Design checklist
When tuning a delayed loop, ask:
- How many seconds or turns old is the information?
- Can one correction cross the target?
- What happens after the correction overshoots?
- Does the oscillation create exciting tension or frustrating randomness?
- Is there a cap or damping rule to keep the system stable?
Exercise
A catch-up bonus uses standings from two turns ago and is strong enough to erase the entire current lead. What behavior should you expect, and name one adjustment that could reduce it.
Show answer
Expect overshoot and possible oscillation as the lead changes sides. Reduce the bonus strength, shorten the delay, or add a cap or damping rule.