-
The rebuilt sky: six islands bridged together around New Haven’s beacon.
-
Town Workshop: page through every building and see what it costs and makes.
-
Consult the Gods: an AI riddle that points to a move you can actually make.
-
Your Captain: design how you look as you walk the islands.
-
GIF
A living town (GIF): residents walk the paths of New Haven.
-
Resources regrow: take too much timber and you have to wait for the forest to come back.
-
Plays on phones: the map, the workshop and the gods on an iPhone.
-
Day one vs. rebuilt: where you start and what you can grow it into.
Inspiration
We grew up playing games like Dragon City, Hay Day and Homescapes. You build something a little at a time, check back to watch it grow, and feel proud of a place you made yourself. We wanted to bring that cozy builder feeling into the hackathon's in the clouds theme, and also make it teach something.
So we made Cloudbreakers, where you rebuild a town across broken floating islands. You don't just collect coins. You learn to live within your means: collect rainwater, grow food, run on clean energy, and keep the bridges between islands repaired. We wanted players to come away with a feel for sustainable energy and sustainable living, like balancing what you use against what you can renew, without it feeling like a lesson.
What it does
- Rebuild the sky. Build shelters, water collectors, gardens and energy buildings on island plots, then bridge out to new islands.
- Resources that regrow. Gathering sites run out and slowly come back, so taking everything at once hurts you later. That's the central sustainability idea.
- A living town. Residents walk the islands, carry what they gather in their backpacks and drop it off at storage.
- Your Captain. New players design their own avatar. It walks around the map and is saved to their account, so it follows them to any device.
- Consult the Gods. For a price, the gods give you a riddle that hints at a real next move. The game checks the riddle against its own rules, so the gods never advise something you can't actually do.
- Plays anywhere. It runs in the browser on desktop and phones, and your town syncs to the cloud.
How we built it
- Frontend: React 18 and Vite. The world is drawn in code on an HTML canvas render loop, with an SVG layer for the interface on top.
- Game engine: a pure reducer (
gameReducer) holds every rule. Because of that, the UI, the tests and the AI advisor all judge the town the same way. - Residents: a Python script traces the walkways in our painted island art into walk grids. Residents find their way around with A* search, which picks the next tile to explore by the lowest
$$f(n) = g(n) + h(n)$$
where $g(n)$ is the distance walked so far and $h(n)$ is an estimate of the distance still to go.
- Backend: FastAPI with MongoDB (through Beanie) for accounts, town saves and avatars.
- AI: "Consult the Gods" sends your town to a hosted LLM, which comes back with a strategy, a poem and a one-word focus. The frontend first works out every move that's legal after you pay, and the backend rejects any advice outside that list.
- Tooling: Docker for local dev, plus GitHub Actions running unit tests, Playwright end-to-end tests and saved-town "checkpoints" that catch save-format changes.
Challenges we ran into
- Keeping the AI honest. Early on, the gods would happily advise building something you couldn't afford or a bridge to an island you hadn't unlocked. We fixed it by having the game engine itself generate the list of valid moves, and if the AI still won't stay inside that list, the player isn't charged.
- Walking on painted art. Our islands are illustrations, not tile maps, so before anyone could walk on them we had to pull walkable paths out of the images.
- Many hands, one codebase. With several of us changing the engine at once (regrowth, backpacks, avatars, building removal), merge conflicts kept breaking the build in ways that weren't obvious. Our CI checks caught several of them.
- Mobile. Fitting a whole builder game onto a 320px-wide phone, and a phone in landscape, took a lot of layout work. That meant compact HUDs, panels that take over the screen, and next/previous buttons in place of scrollbars.
What we learned
- Putting every game rule in one pure reducer made almost everything else easier: testing, saving, syncing and AI advice.
- An LLM works best when it has to choose from options your own code has already checked.
- Small, frequent merges and automated tests beat one big merge the night before.
- Teaching through a game works best when the lesson is the mechanic. Running out of resources teaches sustainability better than any pop-up could.
What's next
More islands, seasons and weather that affect energy output, and co-op towns you build with friends.
Built With
- codex
- databricks
- fastapi
- game
- godaddy
- javascript
- mongodb
- react
- vite
- vscode