Inspiration

We wanted to bring more excitement into daily MBTA commutes by turning them into a fun and interactive game unique to Boston. We took inspiration from Pokemon Go, and how it made people look forward to going outside and exploring. Our goal was to make users look forward to taking the T every day, so we designed a gacha pet collection game, with each MBTA station being a stop where users can roll for a random pet for their empire!

What it does

Boston T-Pets is a mobile collecting game built for riders on the MBTA. Sign up, open the app at a T station, and look for a T-Pets QR code. Each code is tied to a specific stop and line. The server rolls a creature from that line’s loot table and reveals it with a fare-gate animation—the same moment you’d tap through a CharlieCard. Then, the pet is added to the user's collection.

Every pet is a Boston-flavored animal or mascot: shared commons like mallards and gray squirrels show up on any line, while legendaries and line exclusives are tied to Red, Orange, Green, Blue, or Silver (lobster on Red, snapping turtle on Green, snowy owl on Silver, and so on). We also included school mascots in the Boston area, including the BU Terrier, NEU Husky, and MIT Beaver! There are 35 unique pets to fill out. Duplicates still matter: extra pulls add EXP and level your pet up to ★5, and a rare rainbow variant can drop on any roll. There's also a pity system that guarantees legendary pets after a certain number of rides without one, so unlucky players don't have to suffer as much.

Scan — QR camera, server-side rolls, scan cooldowns so you can’t farm one poster all day, and clear feedback when you’re offline or the code is invalid. Collection — Track progress (X / 35), browse what you’ve caught, and open pet details with stars, gold status, and when you first caught each one. Habitat — Home screen with sky, land, and water slots where you can watch your pets roam around. Equip pets you own and earn passive EXP while they’re placed. Leaderboards — Compete on points from scans (rarity, new vs duplicate, gold, daily bonuses) on global and friends boards. Profile & social — @username, stats, scan history, search and follow other players, and visit their profiles and collections.

How we built it

We built BostonTPets as an Expo (SDK 58) mobile app with Expo Router for file-based navigation—Habitat, Collection, Scan, and Profile as tabs, plus social routes for profiles and follows. The UI is TypeScript and React Native, with Reanimated for the fare-gate pull reveal, expo-camera for QR scanning on a physical device, and expo-haptics and expo-audio for feedback during reveals and taps.

For the backend, we used Supabase end to end. Players sign up with Supabase Auth (email and password). Game state lives in Postgres: profiles, scan codes, owned pets, scan history, pity counters, habitat slots, and follows. Critical logic runs in Edge Functions—scan validates the QR payload, rolls server-side, and writes through the record_scan RPC; player loads stats, collection, habitat, and leaderboard data; social handles username search and follow/unfollow. Clients never pick loot: RNG, pity, gold, and duplicate handling all live on the server so outcomes stay fair.

Pet sprites are procedural 32×32 pixel art from scripts/pixel-pets/generate.mjs (shape templates, blink frames). Hand-made PNGs can override via petArt.ts. 8-bit SFX are synthesized in scripts/sfx/generate.mjs so they're original and license-free. A reveal playground (/dev/reveal) replays any pull at different speeds for demos without burning real scans for easy dev testing.

Our primary coding agents used were Cursor (Grok) and Claude, with Nano Banana for art image generation.

Challenges we ran into

Keeping one source of truth for the catalog of pegs across UI, SQL, and functions was difficult, and we ran into a couple of mismatch errors from different versions of our app. We also had trouble incorporating Tiger Data as our primary database, so we opted to use Tiger as a time-series copy of scans for analysis purposes instead.

Accomplishments that we're proud of

We're proud to have implemented the fully functioning gacha game-loop end to end, and how fast and efficiently we did it. We're proud that we were able to customize this game to be locally unique and special to Boston and the MBTA. We're also proud to have built a game that we would be excited to show our friends, because we truly believe this is something that people would genuinely enjoy playing.

What we learned

We learned how to code the logic behind randomized loot tables and gacha collection systems. We also learned how to use new technologies such as Expo Go, Tiger Data, and Nano Banana.

What's next for Boston T-Pets

In the future, we plan to add special events with limited edition pets / collectables. We also want to further incentivize exploring Boston by occasionally having a random T stop hold increased odds or exclusive pets, in the spirit of gacha "banners".

Built With

Share this project:

Updates

Submission history