Run (runrunrunrun.run), Justin's speedrun platformer
runflutterflameplatformerspeedrunproject-overview
Run is a fast 2D speedrun platformer built with Flutter and the Flame engine, played on the web at runrunrunrun.run and as a sideloaded Android APK. It is the source of most of the game-development articles in this encyclopedia. This page records the stable facts about how it is built and where things live; status and plans stay in the project memory.
Stack and layout
- Client: Flutter + Flame (
FlameGamewith QuadTree collision), custom AABB physics in a pure-Dart movement system,flutter_soloudaudio, SharedPreferences for local data. Dart package namerun_game; Android application idcom.justingolden.speedrun_platformer. - Repo
~/dev/run(GitLab remote, CI in.gitlab-ci.yml). - API: Slim 4 + JWT + MySQL (database
run, nottldr) atapi.runrunrunrun.runon the Alma 9 server; credentials live in the server-onlyapi/mysql_conf.phpand a backup options file, never in the repo. Schema baselineapi/schema.sql, migrations inapi/migrations/applied by hand. - Deploy:
./deploy.shruns analyzer and tests, bumps the version, builds web + APK, rsyncs the web build to/var/www/html/run/app/and the APK torunrunrunrun.run/run.apk. Verify withcurl https://runrunrunrun.run/version.json. - Nightly DB backup on the server to
~/db-backups/run/(Nightly MySQL/MariaDB backups with mysqldump and cron).
Game systems (where to read more)
- Movement, wall jumps, dash, camera: Platformer movement feel (coyote time, jump buffering, wall jumps), Platformer camera, viewport size, and aspect ratios; loops: Sonic-style loop-the-loop physics.
- Hazards (chaser, turret, swooper, toxic waste) and counter-abilities (spike strip, shield, laser): Hazards and counter-abilities in a speedrun platformer.
- Liquids: 2D tile-based liquid simulation (cellular automata). Ghosts: Ghost replays for racing and speedrun games. Leaderboards, medals, cheat-code taint: Speedrun timers, medals, leaderboards, and anti-cheat.
- Keys and locks: keys carry a
keyId; portals and platforms reference alockKeyId(a locked platform can be a barrier that opens or a bridge that appears). Unlocks persist through death and reset on level restart; a key can be flagged lose-on-death. Orphan references are harmless. - Multiple "dimensions" per level, gravity flip, wind zones, moving platforms on motion paths.
- Level editor and themes: Building an in-game level editor (Flutter), Theme and skin systems for 2D games. Editor-locked levels cannot be opened in the editor (protects hidden shortcuts).
- Mobile web shell: Serving a phone-friendly Flutter web app from the same URL, Touch controls for mobile action and platformer games.
- Content model and its known structural debts: Game content data models (stable ids, schemas, serialization), Fixed-timestep game loop for browser games, Client/server sync pitfalls (deletes, timestamps, merge policies).
Conventions
- Say "hazards" and "abilities", never enemies or weapons.
- Built-in themes use procedural backgrounds; skins come from themes, never per object.
- Every built-in level ships with a thumbnail; levels relying on secrets are editor-locked.
- Never edit the API on the server; edit locally and deploy (Deploy scripts with rsync (patterns and traps)).