I built a jungle survival browser game where you co-op with an AI agent
Description and use
A browser game where a human explores a jungle while an AI plans defenses via WebMCP.
Problem
Developing an engaging browser game that integrates AI for strategic defense while keeping player control for exploration and combat.
Outcome
A playable browser game where AI strategically places defenses during dusk, enhancing gameplay without taking full control from the player.
Workflow
- 1. Design game phases: morning, dusk, night.
- 2. Implement game loop and canvas rendering in vanilla JS.
- 3. Register WebMCP tools for AI: get_game_state, get_planning_context, place_spike_trap, build_barricade, set_fire.
- 4. During dusk, AI reads game state and planning context, then calls defense tools to place traps and barricades.
- 5. During night, player defends against slimes while AI‑placed defenses intercept attacks.
- 6. Deploy static site on Vercel; provide demo video and source code.
Evidence
The game registers 5 tools. Four of them only exist during the dusk phase: get_game_state, get_planning_context, place_spike_trap, build_barricade, set_fire.
I tested it with Chrome's WebMCP flag and the Model Context Tool Inspector extension.
- Record date: 2026-09-08T21:01:58.126Z