Inspiration
We loved playing catan when we were younger and we thought that it would be a cool project to make a game like Catan specifically to teach about sustainability
What it does
Earthshare is a strategy game where four towns share one river valley. Every decade, each town gets hit by a disaster like a flood, drought, smog, or tsunami. The player answers a quick quiz about it, then picks a fix: a cheap one that pushes the damage onto a neighbor or warms the planet, or a sustainable one that costs more but protects the town for good. Then they build and trade, and watch their town grow on a pixel-art map. After ten decades the biggest town wins, but if global warming hits +3°C first, everyone loses. You can play solo, with friends on one screen, or online with AI filling empty towns.
How we built it
We built everything in TypeScript. The game runs in the browser with Next.js and React, and the online multiplayer runs on a SpacetimeDB module. There is no separate game server. The same tested game rules run in both the browser and the database, so the game behaves the same everywhere. The map, balance, hazards, and quiz questions are all stored in data files, which made the game easy to tweak.
Challenges we ran into
- Keeping online players in sync, including timed quizzes, waiting for every player, and reconnecting.
- Making one set of rules work correctly in both the browser and the database.
- Making disasters and their causes feel fair and realistic, not random.
- Teaching real lessons without slowing down the fun.
- Balancing the cheap and sustainable choices so neither one always wins.
Accomplishments that we're proud of
- A complete, playable game with three modes: solo, hot-seat, and online.
- A single animated pixel map for both sea and island, with tsunamis and cargo boats.
- A design where learning is part of the gameplay: a right answer reduces your losses.
- Tests across 400 simulated worlds, plus a multiplayer test that checks rooms and ownership.
- Easy setup that works on both Mac and Windows.
What we learned
- Environmental problems are shared problems, and one town's choices affect its neighbors.
- Seeded, predictable game logic makes testing and multiplayer much easier.
- SpacetimeDB lets a small team build real-time multiplayer without a traditional backend.
- People learn best when lessons are tied to real consequences in the game.
- Simulations find bugs, but only real players can tell you if a game is fun and fair.
What's next for EarthShares
- Playtest with real players and improve game balance.
- Put the game online so friends can join without any setup.
- Add more disasters, regions, and quiz questions.
- Build tools for teachers, like classroom question sets and post-game reports.
- Add treaties and shared projects between players.
- Make the AI neighbors smarter, and add more languages and better accessibility.
Built With
- next.js
- spacetimedb
- typescript
Log in or sign up for Devpost to join the conversation.