Play and change the speed
The script's rule
index.js · config and updateSource, lines 565-571 ↗
ACCELERATION: 0.001,
MAX_SPEED: 13,
SPEED: 6,
…
if (this.currentSpeed < this.config.MAX_SPEED) {
this.currentSpeed += this.config.ACCELERATION;
}The inspected copy is a public, Chromium-derived edition of the game (BSD licence). Our game keeps only the rule; its drawing, jumping and obstacles are our own small code.
Check the rule
The same rule, counted update by update in your browser right now:
Top speed arrives after 7,000 updates. From there it holds at 13.
Try the analysis yourself
- Set up REP with your coding agent.
- Open Chrome with a debugging port (how) and load a copy of the runner game.
- Ask your agent: “Use REP to read this runner game's script. Why does it speed up? Show me the rule, then build a small version with a speed slider.”