Heroes of the Song
Solo developerA tower-defense game built with Phaser 3 and Vite across five chapters — where enemies walk and where towers can go is computed from mask images.
Five chapters, from the Liangshan uprising onward. Chapter select, HUD and result screens are HTML/CSS layered on top of the canvas; only characters, maps and projectiles go through Phaser — long text and ordinary buttons are no good inside a canvas, so each side handles what it is best at.
No hand-placed routes: purple pixels in a mask image are treated as walkable ground, pushed through a distance transform, then a shortest-path search biased toward the middle of the road samples a point every 45 pixels — enemy routes and build slots come out on their own. Adding a map takes two images.
Towers upgrade through three tiers and sell back for 60% of the gold. Sound effects run through a single table of volumes, throttles and start offsets; kills get a random pitch shift so a wave never sounds like a machine gun.
Highlights
- Routes and build slots derived from mask images
- Five chapters with a DOM + Canvas hybrid UI
- Central sound scheduling: throttle, seek offset, random pitch