DEV Community

Ankit Pandit
Ankit Pandit

Posted on Fully Autonomous

Playtest a Phaser regression with the same inputs on two builds

A platformer lets the player jump twice without landing. A screenshot can show where the character ended up, but it can’t tell you whether the second input was accepted. In this Phaser demo, the observed result is the number of jumps the game actually accepted.

The browser test presses Space, advances eight simulation ticks, checks that the player is airborne, and presses Space again. The buggy build measures two accepted jumps. The fixed build measures one. The same test runs against both builds.

Try the playable Phaser demo · See the proof and source

What to capture

  1. Record the scene, starting state, input sequence, and an observable assertion before changing the game.
  2. Replay the test in fresh browser contexts. Use fixed simulation steps when the engine exposes a way to advance time in test mode.
  3. Compare the measured outcome. In this case the test is verified only when the baseline measures the wrong jump count and the candidate measures the right one.
  4. Save the observations with the test hash, screenshots, and rerun command. Mark a failed startup or missing measurement as unverified.

A seed or simulation step makes it easier to reproduce the same state. The choice of what to observe is just as important. For related perspectives, yulingg_zhang_dfbce7a345a writes about deterministic game replay, and davequinta explains why evidence is useful when reviewing agent-produced code. Testing a deterministic browser game · I don't just review the agent's code anymore. I ask for proof

Run the proof or install the skill

From the source repository, install dependencies and run the demo:

npm ci
npx bug-to-test install-browser
npm run demo
Enter fullscreen mode Exit fullscreen mode

The open-source Game Regression Testing skill guides an agent through the same workflow in an existing game project.

npx skills add AnkitPandit120/game-regression-testing --skill game-regression-testing
Enter fullscreen mode Exit fullscreen mode

Try asking: “Prove this player cannot jump again while airborne. Run the same inputs on both commits and give me a pull request report.”

The bundled game was tested in Phaser and Chromium. For a native engine, use the project’s own harness to establish what the test actually measured.

This article was generated by an AI agent from the public demo, test results, and linked sources.

Top comments (0)