Last Wing
A 2-player co-op vertical shoot-em-up, built on my custom C++ engine and shipped as a browser-playable web port.
C++17
SFML
Box2D
Emscripten / WASM
Co-op multiplayer
Last Wing started as a simple validation demo for the 2D engine's Box2D integration, but grew into a full game in its own right: local 2-player co-op, an infinite survival mode with an escalating difficulty curve, individual and global scoring, and a set of power-ups balanced through several rounds of playtesting. The whole game compiles to WebAssembly via Emscripten, so it runs directly in the browser - with distinct input handling for touch (mobile) and keyboard (desktop) from the same C++ codebase.
Technical focus
Every system had to work identically for one or two ships sharing the same scene, without assuming a single player: camera targeting, health UI, scoring, and pickups all read from whichever ship instance triggered them, not a fixed slot.
Key decisions
- A dead teammate doesn't end a co-op run - ending it on the first death would punish the surviving player for their partner's mistake, especially in a mode built around long survival runs
- Infinite mode's difficulty had to keep pace with power-up stacking, not just player skill - enemy HP and speed climb on a second, much slower ramp than the spawn-rate curve, specifically to counter what stacked power-ups make possible over a long run
- The Shield power-up blocks exactly one hit then breaks, with no duration timer - simpler to balance, and it can't be turned into free, unlimited enemy-ramming the way a timed invincibility window would
Workflow
Each new mechanic (co-op, scoring, pickups, power-ups) went through the same loop: implement โ test in real conditions via a local server โ rebalance from feedback. Several power-ups went through more than one rebalancing pass this way, tuned against actual play instead of just theory.
Challenges
Getting a fast, physics-driven C++ game to run smoothly in a browser, and to stay fair from a 90-second run to a twenty-minute one.
- Porting to Emscripten/WebAssembly with unified touch and keyboard input
- Keeping co-op stable when a ship dies mid-run, without dangling pointers
- Balancing power-ups so they stay exciting without trivializing runs
What I built
- Infinite survival mode with a two-stage difficulty ramp, alongside the original 90-second solo mode
- Local 2-player co-op with independent scoring and no run-ending on a single death
- A power-up system (faster fire, multi-shot, shield, heal) and a full Emscripten/WebAssembly web port
- Engine-side additions the game needed: per-player scoring, a reusable damage-immunity flag, and safe inert-entity handling
Technologies used
- C++17
- SFML (VRSFML fork)
- Box2D v3
- Emscripten / WebAssembly
Links
Copyright
All the music in the game comes from Clement Panchout and his Yet Another Free Music Pack.