# How to use Replit Agent to build a ghost game

Replit Agent built a motion-based ghost game with Three.js and Expo. Phone tests corrected mapping and safe areas; it uses orientation rather than native AR.

Agent: Replit Agent (via Replit Agent 3; Claude Opus within Replit)
Tools: Replit Agent, React Native, Expo Go, Three.js, Socket.io
Category: Games & simulation
Date: 2026-02-11

Outcome: The author reports a playable ghost game with free-play, story and multiplayer modes. It uses orientation-based visuals instead of native world anchoring and required real-phone UI checks.

## Steps

1. Heasman replaced unavailable native AR with gyroscope-based ghost positions in a Three.js view.
2. Replit Agent iterated quaternion mapping, game modes and multiplayer behavior.
3. The engine moved frame updates outside React while Heasman checked safe areas and clipping on phones.

Human oversight: Heasman tested motion mapping and interface behavior on real phones, corrected safe-area issues and decided the game's architecture and modes.

Source: [Ruth Heasman — LinkedIn](https://www.linkedin.com/pulse/spookseek-ar-we-replit-agent-3-i-built-full-ghost-hunting-heasman-oq7ze)

Canonical URL: https://agentsinuse.com/use-cases/replit-agent-to-build-a-motion-ghost-game/
