Boroughs
A team game played across London on phones: race between boroughs doing challenges, take over territory and curse your rivals, with live TfL data and a server keeping every phone in step.
- Year
- 2026
- My role
- Designed the game and built the app, the game server and the data pipeline
- Tools
- JavaScript, Astro, Cloudflare Workers, Durable Objects, Leaflet, Python and GeoPandas
- Data
- TfL Open Data, OpenStreetMap, London Datastore and Open-Meteo
The game
Teams of friends race around London on their phones, doing challenges for coins: 165 of them, from reading a blue plaque aloud to reaching the end of the District line. They spend the coins on boroughs, cards and curses, and every move reaches every phone as it happens. There are 9 versions: Turf War, Crossrail, Landlords, Auction House, King of the Borough, Hide and Seek, Ring Tag, Tag and Borough Bingo. Each is built from 26 mechanics that a custom game can mix, such as rent, auctions, duels, bounties, live TfL line status and London’s weather.
It began as my 2024 prototype, a map of London’s boroughs, stations and live arrivals, and borrows the Ottawa game’s challenges and cards. Here it covers all 33 boroughs, with every team on its own phones in real time.
How I built it
- One Cloudflare Durable Object per game keeps every move in an event log in SQLite and rebuilds the game by replaying it, so any move can be undone or edited afterwards and the same log always gives the same game. Alarms run the clock: curses running out, city events, location pings and the end of the game.
- The rules are one JavaScript module that runs on both the phones and the server, so a phone can show what’s allowed and the server can enforce it.
- A Python pipeline (GeoPandas and Shapely) builds the map from the London Datastore’s borough boundaries, TfL’s stations and line shapes, and the Thames from OpenStreetMap, including which boroughs face each other across the river.
- The app is a progressive web app. It still opens with no signal on the Underground, queues moves until the phone is back online, and sends push notifications signed with keys the server makes for itself.
- Practice bots play through the same rules as people, heading for each version’s objective, so a version can be tried alone.
- A stress test plays hundreds of thousands of random moves, checking for crashes, that replaying a game rebuilds it exactly, that no team’s view leaks another’s secrets, and that the game’s invariants hold. Two-phone tests and whole bot-played games run against the live server, and screenshot checks cover narrow phones, dark mode and accessibility.