rea.run

← Lab · 中文

Lab · browser target

Why the dinosaur gets faster — play the recovered rule

Offline Chromium’s T-Rex runner accelerates as you run. REA can read the loaded script from a public HTTP edition, recover the constants, and help you rebuild a tiny game with a speed control. This page hosts that teaching rebuild on rea.run (static Pages) — play the recovered rule, then follow the operator steps below.

Enable JavaScript to play. You can still read the rule and open the source and license notes below.

Original rule: start at 6, then increase toward 13.

Teaching mini-game: only the acceleration rule is reconstructed; drawing, jump, and collision are new. Drag the slider for a fixed speed. Space or Jump clears a cactus.

Recovered settings (verifiable)

SymbolValueMeaning
SPEED6Starting speed
ACCELERATION0.001Added each eligible update
MAX_SPEED check13Stop accelerating once at/above this threshold
Logic rate (this demo)60 updates/sFixed simulation tick; drawing is separate
if (this.currentSpeed < this.config.MAX_SPEED) {
  this.currentSpeed += this.config.ACCELERATION;
}

Inspected target: wayou’s Chromium-derived browser edition (HTTP). Do not confuse with chrome://dino unless your session documents that URL.

What is new vs reconstructed

PieceSource
Acceleration rule (6 / 0.001 / 13)Reconstructed from inspected index.js
Canvas drawing, jump physics, cactus collision, obstacle spacingNew teaching implementation on this site
Speed slider + auto-accelerate checkboxTeaching controls (not in the original game UI)

Checkpoint table (controlled replay)

A controlled original-game check (obstacles and auto-scheduling disabled) recorded these speeds after N collision-free updates. Click to replay the same rule in the browser:

UpdatesReferenceThis page
06.000—
1,0007.000—
4,00010.000—
10,00013.001—

Note: after 10,000 updates the float lands at 13.001 when rounded to three decimals — the threshold check uses < 13, so one more increment can pass 13 before the branch stops adding.

Operator steps (authorized public page)

  1. Pin rea-agents deliberately (teaching pin elsewhere often 6.5.0; match your session).
  2. Launch Chrome with a remote-debugging port and open the public t-rex-runner URL (templates on /docs/install-demo/).
  3. Ask the agent to list_browser_targets, then inspect_web_page with script sources, and read loaded index.js.
  4. Demand the start speed, increment, and cap check with citations — rules only before any rebuild.
  5. Rebuild a one-file game with a slider; verify the four checkpoints above.
Use REA to inspect this dinosaur game. Why does it get faster?
Show the speed rule, then build a small version with an adjustable speed.

License & attribution

  • Selected speed-rule excerpts: Chromium Authors, BSD-style terms — /licenses/dinosaur-bsd.txt.
  • Standalone extraction commonly cited: wayou/t-rex-runner.
  • This mini-game’s graphics / jump / collision are teaching code for rea.run; redistribute with attribution for the rule.

Related

ResourceLink
Lab hub/lab/
Calculator % lab/lab/calculator-percent/
Codex install demo/docs/install-demo/
DX-Ball Evidence/showcase/dx-ball/
Chinese twin/zh/lab/dino-speed/