Why these prompts work
- They point the agent at llms-full.txt instead of letting it guess an API from memory.
- They name the channel for each kind of data (
sendfor positions, state for health, events for chat), which is where generated netcode usually goes wrong. - They pick the preset that ships sensible rules for the genre.
Any game
Add online multiplayer to my game with the Multiplayer API (https://multiplayerapi.com). Read https://multiplayerapi.com/llms-full.txt first — it is the complete reference. Create a game with POST https://multiplayerapi.com/v1/games using the preset that matches my genre, and wire the SDK into my client: guest login, quickmatch, positions over room.send(), and health and score in shared state.
Phaser realtime arena
Add online multiplayer to my game with the Multiplayer API (https://multiplayerapi.com). Read https://multiplayerapi.com/llms-full.txt first — it is the complete reference. My game is a Phaser 3 arena. Use preset realtime_arena. Send the player's x, y and rotation with room.send() every 50 ms, interpolate remote sprites in update(), put health in room.mine('hp') with rules that bound it to 0-100, and claim pickups with room.setnx().
Three.js FPS
Add online multiplayer to my game with the Multiplayer API (https://multiplayerapi.com). Read https://multiplayerapi.com/llms-full.txt first — it is the complete reference. My game is a Three.js first-person shooter. Use preset realtime_arena. Send camera position and quaternion over room.send() every 50 ms, interpolate remote players on mp.now() about 120 ms in the past, and handle hits by writing hp in shared state with a self-write rule. Add a kill leaderboard with mp.submitScore().
Turn-based card or board game
Add online multiplayer to my game with the Multiplayer API (https://multiplayerapi.com). Read https://multiplayerapi.com/llms-full.txt first — it is the complete reference. My game is turn-based for two players. Use preset turn_based. Keep everything in shared state, make each move an atomic flush of the piece write plus room.cas('turn', me, opponent), set round with setnx at start, and add a rematch by advancing round with cas. Leave peer-to-peer enabled.
Co-op / survival
Add online multiplayer to my game with the Multiplayer API (https://multiplayerapi.com). Read https://multiplayerapi.com/llms-full.txt first — it is the complete reference. My game is cooperative. Use preset coop. Everyone may write world.** at a bounded rate, resources use room.inc(), unique items are claimed with setnx, and host migration is handled through room.on('host'). Emit wave alerts with room.emitEvent().
Harden an existing integration
Review my Multiplayer API integration against https://multiplayerapi.com/llms-full.txt, section 7 (rules) and section 12 (pitfalls). Add declarative rules for every state path I write, declare the events section with unknown_events deny, make sure I respect tick_ms, and check that no secret key (mp_sk_) is shipped in client code.
Tip. After the agent finishes, open the game in two browser tabs. If the second player appears in the first, the loop works. Then run the “harden” prompt before you share the link.
More context
Read multiplayer for AI-generated games for the full workflow, or what a multiplayer API is if you are new to the idea.
Which AI coding tools work with these prompts?
Any agent that can fetch a URL and edit code: Cursor, Claude Code, GitHub Copilot, Windsurf, Replit Agent, Lovable, Bolt and v0.
Does the agent need my account?
No. The agent calls POST /v1/games without authentication and receives a public and a secret key. You claim the game when you subscribe.
Make your game online today
Free sandbox keys in one call, no account and no card. $19.99/month when you ship, for every game you make.
Free sandbox · $19.99/mo to go live · cancel anytime