I built a jungle survival browser game where you co-op with an AI agent
说明与用途
一款浏览器游戏,玩家探索丛林,AI通过WebMCP规划防御。
问题
Developing an engaging browser game that integrates AI for strategic defense while keeping player control for exploration and combat.
结果
A playable browser game where AI strategically places defenses during dusk, enhancing gameplay without taking full control from the player.
工作流
- 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.
证据
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.
- 记录日期: 2026-09-08T21:01:58.126Z