Skip to content

jev-t-rex-runner

Chromium T-Rex Runner game where Jev chooses jump, duck or keep running for each obstacle, plus short or full jump.

Demoprototype

Overview

This is a standalone ES6 copy of Chromium's T-Rex Runner dinosaur game that can be played manually or controlled by TypeSafe's Jev. For each new obstacle Jev chooses one semantic manoeuvre (jump, duck or keep_running) and, when jumping, a short or full jump profile. The browser keeps ownership of speed-aware frame timing, collision geometry, adaptive duck duration and input execution, so the model makes only the tactical choice.

A small local Node server holds the API key and proxies requests, so the key never reaches browser code. Without a key, manual mode still works and the UI reports that AI mode is unavailable. Automated checks run with npm test. The rest of the README documents the underlying game codebase, which has been decoupled from Chromium for easy embedding.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich manoeuvre should the dinosaur make for this obstacle?jump · duck · keep_running
ChoiceWhich jump profile should be used?short · full

How it works

  1. New obstacle appears
  2. Local server sends state to Jev
  3. Jev chooses a manoeuvre and jump profile
  4. Browser executes with its own timing and collision logic

Strengths

  • Clear split between model tactics and game physics
  • API key stays on the local server
  • Manual mode works without a key

Caveats

  • Demo game, no performance metrics reported
  • Requires Node.js 20+ and a TypeSafe key for AI mode

Getting started

npm install, cp .env.example .env, set TYPESAFE_API_KEY, then `node --env-file=.env server.mjs` and open http://127.0.0.1:3000.

At a glance

Type
Demo
Status
prototype
Language
JavaScript
Runtime
Browser + Node server
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

What does Jev decide?

For each obstacle: jump, duck or keep running, and short or full jump when jumping.

Does Jev control timing?

No. The browser handles frame timing, collisions and duck duration.

Can I play without a key?

Yes, manual mode works without one.

Related projects

  • Source for browser chess and Chess960 where code computes each legal move's facts and Jev picks one per turn as a typed Choice.

    ProjectproductionTypeScript
  • Browser 1v1 sniper arena where Jev reads match state about 9 times a second and chooses movement, aim, ADS, firing and jumping.

    ServicebetaTypeScript
  • Instrumented 2048 web lab where every move is a Jev Choice over four directions, with probabilities, latency and cost shown live.

    ProjectbetaTypeScript
  • Fifteen live arcade games where Jev and LLMs play each other, led by WikiRace in which Jev picks only real links.

    ProjectbetaTypeScript
  • Real-time bot battles where you write a fighter's strategy in plain English and a System One model pilots it several times a second.

    ProjectbetaTypeScript
  • Browser extension that lets Jev, local Laya or an OpenAI-compatible model take over a running ra2web (WannaFire) RTS match.

    ProjectbetaTypeScript