Business rules and operational targets
Which game states are allowed to jump back after a failure and which ones must be maintained?
The system boundary leads to a business rule: G-21 has at most one reward record for 1 crystal. Only the current authority generation confirms effects. Client-side movement prediction grants no ownership. An operational target describes a measurable property and begins as a test assumption.
Starting point Let the game server decide ownership.
Assumptions for the example case
A fictional example design: one session with at most 32 players, server-authoritative movement, one-time pickup of world items, reconnection within the same session and durably confirmed rewards. Figures and quality goals are illustrative test assumptions. A shared global game world, player trading, paid items and comprehensive fraud detection are outside the scope.
Rules governing the result
Authority checks · Generation, sequence, distance, ownership
Crash after the record: a higher generation reads the same winner; unconfirmed movement may revert to the checkpoint.
Client prediction is a display; ownership changes require the current generation and server-side distance.
Business requirements (functional)
Further reading
- Invariant
- G-21 has at most one reward record for 1 crystal. Only the current authority generation confirms effects. Client-side movement prediction grants no ownership.
- Boundary test
- The pickup radius includes 2,000 mm: allow server-side distances of 1,999 and 2,000 mm; reject 2,001 mm. All distances in this example are integer millimetres.
- Unresolved outcome
- The server persists the winning record and crashes before responding. The new authority generation reads the record and confirms the same winner. Unconfirmed movement may revert to the last checkpoint; confirmed crystal ownership survives.
Quality goals (non-functional)
Further reading
- Local acceptance
- Illustrative target: 95% of local management commands complete within 800 ms under the peak profile of 100 sessions × 640 = 64,000 inputs/s in total. Measure external execution and media transmission separately.
- Traceability
- Every rejected or open operation shows its reason, latest evidenced state and responsible role. Check this in a sample after the failure from step 7.
Separate displayed predictions from confirmed outcomes
Show predictions and confirm rewards only after a durable record exists.
Smooth movement and durable rewards have different requirements.
Resetting a movement snapshot does not lose a confirmed crystal.
- Alternative considered
- Persisting every snapshot greatly increases write load.
- Trade-off
- Movement may visibly jump back after a failure.
- Reassess
- The game design requires fully reproducible movement.
Terms in this step
- Separate displayed predictions from confirmed outcomes
- Resetting a movement snapshot does not lose a confirmed crystal.
Try it yourself
After a server crash, distinguish movement rollback from loss of a confirmed crystal. Which observations violate the contract?
A hint for your attempt
Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.
Compare with a possible solution
- First part of the solution
- Unconfirmed movement may revert to the checkpoint; this limitation is explicitly agreed.
- Second part of the solution
- A confirmed crystal must survive through its durable record. Losing it violates the guarantee and fails the test.
Apply to your project
Which corresponding assumption would you test first in your project? Consider this trigger: The game design requires fully reproducible movement.