iPhone game
El Corre Corre
An arcade motorbike ride down the Malecón of Santo Domingo, for iPhone. Riding against traffic doubles the score.
- Role
- Timeline
- Stack
- Links
By the numbers
108
unit tests in 11 files
0
audio files; all music and sound effects are synthesized with Web Audio
16
App Store screenshots, 8 per language, rendered by a headless tool at 1320 x 2868
-
Spawn accepted
With the new vehicle, the road still has a corridor at least 1.7 player widths wide.
-
Spawn refused
With the new vehicle, every gap is narrower than 1.7 player widths, so it would form a wall. The spawn is refused.
The check measures the whole road, shoulders included. A unit test expects zero walls at cruise speed, at full gas, and on both sides of the road.
The idea
El corre corre is the daily rush in Santo Domingo. In the game you ride a motorbike down the Malecón between guaguas and motoconchos, pull a wheelie, and decide whether riding against traffic is worth double points.
What I built
The game is TypeScript and three.js with no framework and no physics engine, wrapped for iOS with Capacitor. The road runs through three sections: the Malecón, the Zona Colonial with the Puerta del Conde, and El Campo. Every tuning value that changes how the ride feels lives in one config file, each with a comment that explains it.
All music and sound effects are synthesized at runtime with Web Audio, so the repo has no audio files. A headless tool renders named game scenes at App Store size in both languages, and the 16 store screenshots came from it. A test hook for probes and fixed spawns exists only in development builds, never in the release bundle.
The hard parts
-
Traffic that always leaves a way through
Vehicles that arrive together can form a wall across the road. Before a vehicle spawns, the traffic system measures the widest open corridor among the vehicles arriving with it and rejects the spawn if that corridor is narrower than the configured number of player widths. A unit test asserts zero walls at cruise speed, at full gas, and on both sides of the road.
-
Progress iOS cannot wipe
iOS can clear a web view’s storage when the phone needs space. Saves are mirrored from localStorage into Capacitor Preferences, which is native storage, so progress survives that.
-
Sound without audio files
Music and sound effects are built at runtime from oscillators, gain nodes, filters, noise buffers and a compressor. That keeps audio files out of the app bundle.
What’s next
Release 1.0 on the App Store.
Try it
Related by idea
Tests against the real runtime or the real data
Saves that survive reloads, updates and storage loss
Conuco, Coherente, SWARMGEDDON, Invicto