Skip to content
Sean Marroquin
Esc
  • HomePage
  • WorkPage
  • AboutPage
  • Start a projectPage
  • How this site is builtPage
  • BlogPage
  • DownloadsPage
  • Client PortalClients
  • TerraLoopCase study
  • ListoCase study
  • The Listening RoomCase study
  • PasslineCase study
  • AccuBetsCase study
  • How this site is builtPost
  • Why every client gets a portalPost
  • Switch between light and darkAction
  • Copy my email addressAction
  • PWNTT ArcadePlay
  • Play The Deploy TrailPlay
  • Play Merge ConflictPlay

Use the arrow keys to move and Enter to open.

All work

TerraLoop

A GPS territory game for iOS and Android: walk, run, bike, or drive a closed loop and the ground inside it becomes your team's.

  • The server decides every capture. The phone only records the route.
  • Two authoritative anti-cheat layers, with device attestation built and waiting on credentials.
  • Land is earned by loops, progression by movement: a run that claims nothing still counts.
  • Nothing that changes who holds the map can be bought.

The idea

Fitness apps record where you went. TerraLoop asks what you took. Close a loop in the real world and the area inside it becomes your team's territory on a shared map. Encircle a rival's zone and you capture it whole; overlap one and you carve off a slice; touch your own land and the two merge.

That one rule turns an ordinary run into a decision: which streets enclose the most ground, which rival zone is worth the detour, and whether you can close the loop before your legs give out.

What I built

Three surfaces, one game server:

  • The app, for iOS and Android, built with Expo and React Native. It records in the background with the screen locked, survives a crash or restart with the route intact, and queues finished activities until the server is reachable again.
  • A web portal for stats, history, route replays, a route builder, and account settings.
  • An admin dashboard with a cheat-flag review queue, player lookup, tier management, and broadcast notifications.

Around the core loop sits everything that makes a map worth coming back to: seasons with a reset, teams with join requests and officer roles, alliances, regional leagues with promotion and relegation, daily and weekly quests, team challenges, scheduled group runs with RSVPs and reminders, weekly recaps, and share cards that draw the actual shape of the ground you took.

How it works

The server is the referee. Loop detection and every capture rule run on the server (geometry.js, using Turf.js polygon operations). The phone previews a loop so the player gets instant feedback, but nothing it says is trusted. Walk, bike, and drive keep separate territory pools, so the same block can be held by a walker and a cyclist at once.

Cheating is assumed, and checked twice. The app warns about mocked locations, poor accuracy, and impossible jumps while you record. The server then re-checks the whole route on its own: sustained and burst speed limits per mode, teleports, the share of mocked fixes, timestamp sanity, and statistical tells of a generated track, such as perfectly constant accuracy. Soft signals lower a trust score instead of punishing a real person with a steady pace. A route recorded under the wrong mode comes back with a suggested mode and a one-tap resubmit, because that is a mistake, not an attack. A third layer, Play Integrity on Android and App Attest on iOS, is built end to end and rolls out in stages once the platform credentials exist.

Big territories need a siege. A season of work should not vanish to one lucky loop. Zones over 20,000 m² take cumulative damage from repeated encirclements instead of flipping at once, and a siege that does not finish within 72 hours is repelled. Land nobody revisits slowly decays, so holding ground takes upkeep rather than a single paint job.

Fair by construction. A team challenge sets a target and never a reward, and the schema has no column to put one in. Pro is cosmetic and quality-of-life only: territory patterns and borders, air quality, pollen, place names. Anything that changes who holds the map is free for everyone.

Built to grow without a rewrite. Territories carry an indexed bounding box, so a capture check only runs polygon math against nearby zones, and the map loads by viewport. The move off SQLite is planned in two deliberate steps (managed Postgres first, then PostGIS), the server already runs its whole test suite on both engines, and an admin endpoint watches for the thresholds that trigger each step.

Where it stands

TerraLoop is live on the App Store and Google Play. Billing through RevenueCat and Stripe is built and needs only store products and keys to switch on.