remix-multiplayer
Enable multiplayer support for a Remix game
Best use case
remix-multiplayer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Enable multiplayer support for a Remix game
Teams using remix-multiplayer should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/remix-multiplayer/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How remix-multiplayer Compares
| Feature / Agent | remix-multiplayer | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Enable multiplayer support for a Remix game
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Implement Multiplayer Workflow
## Overview
This skill guides you through enabling and integrating multiplayer functionality
for games on the Remix platform. Current platform support is two-player,
turn-based multiplayer using the SDK `multiplayer` namespace.
## Prerequisites
- A game must be created on the Remix platform (you need a game ID).
- The `REMIX_API_KEY` environment variable must be set.
- The game must include the RemixSDK script tag:
```html
<script src="https://cdn.jsdelivr.net/npm/@remix-gg/sdk@latest/dist/index.min.js"></script>
```
## Steps
### 1. Check for Existing Game ID
Use `gameId` from task context or prior tool results when available.
Otherwise, read the nearest `.remix-cli.json`. Older projects may still use
`.remix-mcp.json`. If either contains a `gameId`, reuse it.
Only if none of those sources contain a `gameId` should you follow the
**upload-game** workflow to create one.
### 2. Enable Multiplayer
Do not rely on `updateGame` or a direct REST `isMultiplayer` toggle. Upstream
workflow docs currently treat multiplayer platform enablement as a Remix-side
flag, not a public agent mutation.
### 3. Integrate Multiplayer in Game Code
```js
const sdk = window.RemixSDK
await sdk.ready()
// Access all players in the session
const players = sdk.players // Array of player objects
// Listen for game state updates from other players
sdk.onGameStateUpdated((state) => {
// Sync game state from other players
})
// Send game state to the other player when a turn ends
sdk.multiplayer.actions.saveGameState({
gameState: currentState,
alertUserIds: [opponent.id],
})
```
### Important: Use Multiplayer gameOver
For multiplayer games, use `multiplayer.actions.gameOver` -- NOT
`singlePlayer.actions.gameOver`. Pass a score array with player IDs:
```js
sdk.multiplayer.actions.gameOver({
scores: [
{ playerId: player.id, score: playerScore },
{ playerId: opponent.id, score: opponentScore },
]
})
```
### Keep Standard Hooks
Multiplayer games still need these callbacks:
```js
sdk.onPlayAgain(() => {
// Reset game state and restart
})
sdk.onToggleMute(({ isMuted }) => {
// Mute or unmute all audio
})
```
## Tips
- Use `sdk.players` to get the two players and their IDs; multiplayer is
currently two-player only.
- `onGameStateUpdated` fires whenever another player sends state -- validate it
before applying it, and use `sdk.multiplayer.actions.refuteGameState(...)`
when an incoming update is invalid.
- Use `alertUserIds` when saving multiplayer state so the next player is
notified that it is their turn.
- Do NOT mix `singlePlayer.actions.gameOver` and `multiplayer.actions.gameOver`
in the same game. Use one or the other.Related Skills
remix-upload-game
Upload and validate HTML game code for Remix. Use when creating or updating a draft version through the CLI, MCP tools, or direct REST calls.
remix-upload-asset
Upload images, audio, or 3D models as hosted game assets
remix-submission-rules
Validation and publish constraints for Remix game submissions
remix-shop-items
Create, update, delete, and integrate Remix shop items. Use when a game needs Bits items, consumables, one-time unlocks, tier unlocks, store icons, or purchase handling in @remix-gg/sdk code.
remix-save-game
Add save and load game state functionality via RemixSDK
remix-rest-snippets
REST client snippets for Remix agent publishing
remix-open-game
Open a game in the Remix Studio browser for preview and editing
remix-game-sdk
Reference for the current @remix-gg/sdk runtime. Use when generating or repairing Remix game code, shop item integrations, save-state flows, multiplayer hooks, or host-safe mobile UI behavior.
remix-game-creation
Create a new game draft via the Remix API
remix-game-best-practices
Mobile-first game creation best practices for Remix
remix-cli
Use the official Remix CLI for authentication, config inspection, game creation, uploads, and analytics. Trigger this skill when a task involves `remix login`, `remix whoami`, `.remix-cli.json`, `REMIX_API_KEY`, or terminal-based game management on Remix.
remix-api-reference
OpenAPI-first endpoint reference for Remix game publishing REST routes