Protection of the Spheres
Game
Protection of the Spheres is a browser game that plays like the Warcraft III map Defense of the Ancients, as it stood in DotA Allstars 6.72 and 6.73, with heroes, items and art of its own. Two sides of five heroes push three lanes of creeps toward the other side's Sphere, and the side whose Sphere breaks loses. I built it in one session with a coding agent, for a friend.
Each of the ten heroes carries a DotA hero's abilities and numbers under an original name and look: Ironvow after Sven, Rime after Crystal Maiden, Cinder after Lina, Thistle after Drow Ranger, Gristle after Pudge, Tectus after Earthshaker, Kestrel after Juggernaut, Hexwright after Lion, Longwick after Sniper, and Tempest after Zeus. The rules come from archived playdota.com mechanics pages and IceFrog's changelogs.
Arcade has ten missions that teach the game, from last-hitting in one lane to five against five, and a custom match with up to four allies and up to five enemies, where the computer's skill is set separately for each side. The computer players run on behavior trees.
Online, up to ten players join by room code. Browsers find each other through public Nostr relays and then connect directly, with rollback netcode. When a player drops, the computer takes their hero, and the player can rejoin from the room link. To test it, five browsers played one five-against-five match online for ten minutes, one of them dropping and rejoining, and their checksums agreed throughout.
A second round gave it a rounder look. Every hero, creep and building is now built from spheres and soft shapes, the heroes with faces, under softer light, and every ability shows as it happens, from the glow in the caster's hands to the stars over a stunned head. The shop shows each item's build tree, and in a match the pointer stays locked to the window, so the camera pans at every edge. The five-browser test was run again after these changes, and the checksums still agreed.
It is a Builder project: a Rust core holds every rule, a WebAssembly shim passes values to the page, and the page only draws what the core returns.
Playing it
Right-click the ground to walk, and an enemy to attack it. Q, W, E and R use abilities, and a targeted ability waits for a click. Press O and then an ability key to learn it. B opens the shop, Tab the score, and Space centres the camera on your hero. Click an item in the shop to see what it is built from, then Buy. Clicking the battlefield locks the pointer to the window, and Esc lets it go. Gold comes only from the killing blow, so land the last hit on enemy creeps, and deny your own below half health.
Checked in Chromium, Firefox and WebKit.