Skip to content
OpenEnvisionGameMap
GameMap
GameMap
LearnGuides & notes
Game enginesPrototype a game rule in Three.jsGraybox and playtestState, resets & replaysRead and compare benchmarksStudy browser game cases

Templates & project notes

中文/English

State, checkpoints and replay in game experiments

  • 6 sections

A quest exchanges a herb for coins and unlocks a gate. Interrupt the game after the inventory update and before the reward reaches the save file. What should a player find after loading? A replay study needs a precise answer, because a duplicated reward changes the starting conditions of every subsequent trial.

Reconstruct a failure from the save state

In this example the agreed pre-exchange state is one herb, zero coins and a locked gate. The completed state is zero herbs, five coins and an open gate. A recovered save may represent either state according to the declared recovery policy. Zero herbs and zero coins indicates a partial exchange. Ten coins after a second reload indicates that recovery can apply the reward twice. Include dialogue progress in the observation if it determines whether the player can attempt the exchange again.

  1. Save before the exchange and inspect the inventory, reward balance and gate. Choose an operation ID for this exchange that survives a reload.
  2. Repeat from the same save and interrupt before the debit, between debit and credit, and after both writes. Record the last acknowledged operation and the state recovered in a fresh process.
  3. Load the recovered save twice and retry the original interaction. Compare inventory, currency, gate and quest text with the permitted outcomes. An identical screenshot can conceal a second credit to the account.

A benchmark also needs to distinguish a task that reached its terminal condition from a run stopped by an external time limit. Gymnasium exposes these as separate signals. The same distinction belongs in a game trace when an episode times out during a pending interaction. Gymnasium environment API

Narrative checkpoints, cancellation and world-effect transactions

Story state may contain the current line, variables or interpreter position. A game that grants rewards in response to dialogue also owns inventory and currency. In ink, the integration can serialize story state. The host game must decide how to coordinate this with its own save. For the herb exchange, retrying the dialogue command with the same operation ID should leave the committed balance unchanged. Check an interrupted conversation as well as an ordinary save. ink runtime guide

Server-owned gameplay state and transaction boundaries

A server may commit a reward before the client receives the acknowledgement. The retry is then a second delivery of the same request. In an integration using Nakama, a conditional storage write can reject a stale object version. The game still needs to recognize an operation that was already credited, including a retry made after reading a fresh version. Log the operation identity and inspect the durable balance after reconnecting. Nakama storage collections

Unreal replay: reconstruction, checkpoint fidelity and reset boundaries

Unreal's replay system reconstructs recorded network state. For an experiment on gate opening, check that the relevant actor and property are recorded. When seeking to a checkpoint, inspect the gate and the reconstructed inventory before and after the recorded interaction. Keep external effects, such as payments or analytics, out of replay or check that they cannot fire twice. A convincing replay image gives little evidence about unrecorded local state. Unreal Engine 5.6 replay guide

MuJoCo checkpoint inclusion and reset-observation contracts

Saving position and velocity may be adequate for drawing the initial pose and insufficient for reproducing the next step. Record the state fields used, pending controls and any simulator-external policy memory. Restore the checkpoint, issue the same next action and compare subsequent observations at the same simulation steps. Declare tolerances for continuous quantities before comparing them and check discrete events separately. MuJoCo state definitions at the inspected revision

Stateful interaction discovery and failure reduction

An automated test discovers a duplication after twelve actions. Shorten the sequence by removing actions, restoring a fresh copy of the same initial save before each attempt. Retain a shorter sequence only when the same failure recurs. Retest the reduced sequence several times, recording failures and non-failures. A runner that creates a fresh test object while reusing the same game process may quietly carry inventory between attempts. Hypothesis stateful testing

A reproducible report includes the original and reduced traces, starting save, build identifier, test runner, initial observations and failing assertion. For version-specific details on dialogue cancellation, replay checkpoints and physics state, consult the earlier source review. Archived implementation notes

Sources & document information

Prototype mechanics, observe players, and reproduce published comparisons.

View Markdown source

Graybox and playtest

Previous Page

Read and compare benchmarks

Next Page

GameMap

A little direction for your next playable world.

Games

  • Game examples

Tools

  • Resources
  • Agent toolkit
  • Testing library

Research

  • Papers
  • Repository research

Learn

  • Guides & notes
GitHub
GameMap

On this page

Reconstruct a failure from the save stateNarrative checkpoints, cancellation and world-effect transactionsServer-owned gameplay state and transaction boundariesUnreal replay: reconstruction, checkpoint fidelity and reset boundariesMuJoCo checkpoint inclusion and reset-observation contractsStateful interaction discovery and failure reduction