# Ember Run

> A browser parkour game where chaining moves builds flow and raises your top speed. Six characters, three chapters, and every sound made in code.

Solo · Aug 2026 · prototype

## Results

- 6 playable characters
- 3 chapters with boss fights
- 0 audio files: all sound is synthesized

## The problem

I wanted a platformer where speed is earned through momentum and kept by skill, with six characters whose kits each answer the course differently. Movement had to be generous enough that no character can get stuck, so difficulty comes from gaps and enemies, not impossible geometry.

## What I built

- A player controller with coyote time, jump buffering, variable jump height, wall jumps, dash, slide, and a flow meter that adds up to +140 top speed.
- Six characters with distinct kits, and three data-driven chapters with enemies, checkpoints, and a boss guarding each gate.
- Ghost replays of your best run, recorded at 20 Hz and smoothed to 60 fps.
- All music and sound effects synthesized with WebAudio, plus a Python tool that re-centers misaligned sprite sheets.

## The hard part

Ghost replays on a physics engine that is not deterministic. Phaser's arcade physics uses a variable timestep, so replaying inputs would drift. I recorded outputs instead (position, animation state, facing) at 20 Hz, smoothed them up to 60 fps, and snapped instead of smoothing across jumps over 250 px so respawns don't streak across the map. The sample stream is the same shape a live co-op mode would send over a socket.

## How it fits together

- Keyboard -> Player controller
- Kits + levels -> Game scene (levels)
- Player controller -> Game scene (movement)
- Game scene -> Ghost recorder (samples)
- Game scene -> Synth audio (cues)

Parts David built: Kits + levels, Player controller, Game scene, Ghost recorder, Synth audio.

Character sprites are licensed asset packs; the movement, levels, replays, and audio are mine.

## Decisions

- Ghosts record what happened (position, animation), not the inputs, because the physics engine isn't deterministic.
- Characters and levels live in data files, so a new kit or chapter needs no engine changes.
- Every sound is synthesized with WebAudio instead of shipping audio files, so the game stays small and fully in code.

Tech: Phaser 3, JavaScript, WebAudio. Links: [live](https://ember-run.vercel.app)

Page: https://davidantwi.vercel.app/work/ember-run
