Inspiration
Every year, an estimated 8 million metric tons of plastic (about 17.6 billion pounds) end up in the ocean. Sea turtles mistake plastic bags for jellyfish, seabirds feed bottle caps to their chicks, and ghost nets keep fishing long after they're lost. Much of it doesn't start in the ocean, though. It starts as a wrapper on a sidewalk, a bottle on a beach or a cup by a creek, and the next rain carries it into the water.
Cleanups work, but they rely on people who already care enough to show up. Meanwhile, millions of people will happily walk miles to catch creatures that don't exist. We wanted to point that energy at something real: what if every piece of litter was a creature worth catching?
What it does
Trashimon GO is a creature-collecting game where the creatures are real trash.
- Catch: point your camera at a piece of litter and snap it. The game identifies it as one of 26 Trashimon species, from the common Capling (bottle cap) to the epic Tanglefin (fishing line). It also estimates the item's size and weight, then flips a catch card with its rarity, points and condition.
- Your partner: pick one of three companions on first launch. They react to every catch out loud, with their own voice and five emotions, and cheer when you break a record.
- Shiny zones: litter caught within 100 m of water, or in a photo that clearly shows a shoreline, is shiny and worth double, because that's the trash closest to reaching the water. The map lights up glowing zones along beaches, rivers, creeks, lakes and ponds.
- Do Not Touch: needles, syringes and broken glass are never "caught". Your partner tells you not to touch them, and you snap them from a distance, which pins them on your map so you can point a cleanup crew to them. Legendaries like the Phantom Net (ghost fishing net) and tires are report-only too, since they're too big or tangled to haul alone.
- Bin finder: tap your partner on the catch card and they pin the nearest trash can (or a recycling point that takes that material) on the map, with walking directions.
- Progress: fill your Trashdex, keep a daily streak, chase weight records, level up from Beach Rookie to Trashimon Master, and keep every catch in your Bag.
- Trading: swap finds with a friend in person by scanning each other's QR codes.
How we built it
- App: React Native with Expo and expo-router, so the whole team could run it on our own phones through Expo Go. Animations use Reanimated, and the UI is a "liquid glass" design system built on iOS's native glass effect, with a blur fallback elsewhere.
- Identification: Claude Haiku 5.5 looks at the photo and answers in a strict JSON schema: the species (or hazard / unknown), size class, weight, a short condition note, a quality grade, whether the scene shows a shoreline, and one spoken line in the companion's personality. The system prompt is cached per companion to keep catches fast.
- Voices: each companion has their own ElevenLabs voice. Their line types out in a speech bubble while voice bars bounce as they talk, and if the network fails, the app falls back to the phone's built-in text-to-speech.
- Map data: water shapes and public bins come from OpenStreetMap through the Overpass API.
- No backend: catches, photos and progress live on the device. Trading works face to face with QR codes, so there are no accounts and no servers to run.
- Companion art: three sprite sheets with five emotions each. A small Python/Pillow script splits them into frames and lines up every frame by the feet, so the character doesn't jump when their mood changes.
- Tests: the game rules (scoring, leveling, records, trading, map geometry) are plain TypeScript modules with 133 unit tests.
- Tooling: we built it with Claude Code, splitting the work across parallel agents (game logic, camera flow, map, companions, trading) while we focused on design and testing on real phones.
The math behind the game
Every species catch is scored as
$$ P = \operatorname{round}\left(B \cdot t \cdot s \cdot q\right) $$
- B is the rarity base: 10, 25, 50, 100 or 500, from common to legendary
- t is the species' threat to marine life, from 1 to 5
- s is 2 for a shiny catch, otherwise 1
- q is the condition multiplier: 1.25 for renewable (clean enough to recycle), 1 for discardable and 1.5 for horrid (filthy or broken)
Hazard reports skip the formula and earn a flat 75 points (double when shiny).
We tuned it so that rare, harmful items beat piles of common ones. A plain bottle cap (common, threat 4) scores 10 × 4 = 40, while a tangle of fishing line (epic, threat 5) scores 100 × 5 = 500, so one fishing line is worth more than twelve bottle caps.
Points are also XP. Climbing from level ℓ to ℓ + 1 costs
$$ \operatorname{round}\left(80 \cdot \ell^{1.45}\right) \text{ XP} $$
so reaching level L takes
$$ \mathrm{XP}(L) = \sum_{\ell=1}^{L-1} \operatorname{round}\left(80 \cdot \ell^{1.45}\right) $$
That's 80 XP for level 2 and about 130,000 XP for level 30 (Trashimon Master), so early levels come fast and later ones take real dedication.
A catch is shiny when OpenStreetMap shows water within 100 m of you, or when the photo itself shows a shoreline. On the phone, distances to shiny zones and bins use the haversine formula:
$$ d = 2R \arcsin\sqrt{\sin^2\frac{\Delta\varphi}{2} + \cos\varphi_1 \cos\varphi_2 \sin^2\frac{\Delta\lambda}{2}} $$
where R is Earth's radius, φ is latitude and λ is longitude.
To draw shiny zones, we sample each shoreline every g = 150 m and draw a circle of radius r = 100 m around each sample. Halfway between two samples, the circles still reach
$$ \sqrt{r^2 - \left(\tfrac{g}{2}\right)^2} = \sqrt{100^2 - 75^2} \approx 66\text{ m} $$
out from the shoreline on either side, so neighboring circles always overlap and each shoreline gets an unbroken glowing band about 132 m wide.
Finally, the bin finder prefers a recycling point that accepts your item's material, but only if it isn't much farther than the nearest trash can:
$$ d_{\text{recycling}} \le 2 d_{\text{trash}} + 150\text{ m} $$
Challenges we ran into
- Overloaded public map servers: the free Overpass servers are often busy or rate-limited, so trying them one after another left the map empty. We now ask all three mirrors at once and use the first good answer. We also rewrote the map's shiny-zone query from a radius search with pattern matching into a bounding box with exact tags, which took one test on Toronto's waterfront from timing out to 2.4 seconds.
- A crash at launch: the app built fine but crashed at startup, on phones and on web. The cause was a circular import in an SDK's modern module build, which broke in development bundles. Forcing the bundler to use the SDK's older module format fixed it.
- The model copying its examples: early on, the companion told players to get trash "off the beach" in the middle of a parking lot, because that phrase was in the prompt's example lines. We rewrote the prompt so examples set the tone only and the beach comes up only when the photo shows one.
- Believable weights: a model can't weigh anything from a photo, so each species has a weight range per size class. The model picks a size and an estimate, and the game clamps it into range, so records stay fair.
- Getting it onto our phones: campus Wi-Fi blocked our phones from reaching the laptop running the dev server. We moved to a hotspot and then a tunnel so every teammate could test from anywhere.
What we learned
- Game design is behavior design. Every scoring rule nudges where people look and what they pick up. Weighting each item by rarity and threat, and doubling it near water, points players toward the trash that does the most harm.
- Structured outputs make AI reliable enough to build on. A strict schema turned a vision model into something game logic can trust. We still clamp, sanitize and handle refusals, because a wrong answer should never break a catch.
- Design for flaky infrastructure. Public APIs fail all the time. Racing mirrors, caching results and failing calmly matter more than any single request.
- Small bits of math go a long way. The Pythagorean theorem told us how far apart we could space circles along a coastline without leaving gaps.
What's next
- Bundled map data for event areas, so shiny zones and bins work instantly even on bad Wi-Fi
- Community cleanup events with shared goals and team leaderboards
- Exporting catch data (what, where and how much) to cleanup organizations and citizen-science projects that track litter
Built With
- android
- anthropic-api
- claude
- claude-code
- elevenlabs
- expo-camera
- expo-go
- expo-location
- expo-router
- expo.io
- github
- ios
- node.js
- openstreetmap
- overpass-api
- pillow
- python
- react-native
- react-native-maps
- reanimated
- typescript
- zod