Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

multiplayer-game-architecture

БесплатноЗапускает вложенные скриптыНе проверен

Design and review the networking contract for multiplayer games before engine or backend implementation. Use when a team must choose dedicated-authoritative…

akillnessот akillness★ 63 звезды на GitHub

Об этом скилле

Multiplayer Game Architecture

Build the multiplayer contract before writing netcode. The output is a reviewable multiplayer-contract.json, not a framework recommendation disguised as architecture. Topology, authority, replication, transport, session lifecycle, security, and tests must agree with one another.

When to use this skill

Use it to:

  • design or review a new multiplayer game's networking model;
  • retrofit multiplayer into an existing game without mixing client and server truth;
  • choose authority and replication per state domain;
  • compare browser or engine transports against actual delivery needs;
  • define lobby, allocation, join, reconnect, late-join, finish, and shutdown behavior;
  • investigate desync, prediction error, cheating, host migration, or network instability;
  • turn vague goals such as "make it multiplayer" into an executable contract and test matrix.

Do not use it for local couch multiplayer, generic game mechanics, visual UI, build logs, frame-time profiling, or cloud deployment by itself. Route concrete Unity APIs to unity-technologies-skills, Three.js/browser gameplay to web-game-development, red builds to game-build-log-triage, release automation to game-ci-cd-pipeline, service tests to backend-testing, and production telemetry to monitoring-observability.

Instructions

1. Freeze the session envelope

Inspect the existing repository and record:

  • player count range, pace, session length, and join model;
  • casual, cooperative, ranked, or adversarial fairness needs;
  • target platforms, regions, and browser or console constraints;
  • simulation ownership, persistence, hidden information, and existing backend services;
  • late join, reconnect, spectator, host migration, and protocol-version expectations.

Ask only for blockers. If answers are unavailable, state assumptions explicitly instead of silently choosing a stack.

2. Choose topology before transport

Pick one primary model and explain the trust boundary:

  • Dedicated authoritative server: use when fairness, persistence, hidden state, or independent match continuity outweighs hosting cost.
  • Listen server: use for trusted or low-stakes sessions only after defining host advantage, host loss, migration, and cheat risk.
  • Relay-assisted peer: use when direct reachability or privacy needs a relay, but do not confuse encrypted transport with authoritative gameplay.
  • Deterministic lockstep: use only when the simulation can stay deterministic across target platforms and the wait-for-input tradeoff fits the game.
  • Asynchronous service: use for turn, command, or state-transition games that do not need a continuous real-time simulation.

Do not choose WebSocket, WebRTC, WebTransport, UDP, or a vendor SDK until this decision is stable. Transport is a delivery mechanism, not an authority model.

3. Write an authority matrix

For every gameplay-critical domain, name the writer, allowed client intent, and authority validation. Cover at least movement, combat or actions, inventory, economy, match state, and hidden information when they exist.

Clients may own presentation, local input collection, and speculative visuals. They must not author trusted outcomes merely because their connection is encrypted. Avoid sending hidden state that a client should never know.

4. Select the replication model per data class

Choose only the mechanisms the game needs:

  • turn or command replication for discrete state transitions;
  • authoritative state snapshots or deltas for non-deterministic real-time worlds;
  • input lockstep for deterministic simulations;
  • local prediction plus server reconciliation for latency-sensitive owned movement;
  • interpolation for remote entities and replaceable visual state;
  • bounded lag compensation only for mechanics whose fairness policy permits rewind;
  • relevance, priority, and interest management when every client does not need every entity.

Never copy an engine's default tick or snapshot rate into the contract. Record a proposed value only with a mechanics-based budget, profiling evidence, and a measurement plan.

5. Choose channels and fallbacks

For browser games, verify the current target-browser matrix before choosing:

  • WebSocket is broadly supported and simple for bidirectional client-server traffic, but the classic browser API has no backpressure;
  • RTCDataChannel provides encrypted peer data channels and configurable delivery, but still needs signaling and does not solve gameplay authority;
  • WebTransport provides HTTP/3 streams and datagrams, but requires HTTPS/server support and a compatibility decision for older targets.

Map each message class to reliability, ordering, freshness, size, and overflow behavior. Use separate logical channels where reliable bulk traffic would block time-sensitive state. Define fallback and resync behavior rather than assuming the network is healthy.

6. Define lifecycle and security tog

Полный SKILL.md на GitHub

Установить multiplayer-game-architecture в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Read
Write
Edit
Glob
Grep
WebFetch

Вложенные файлы

SKILL.toonevals/evals.jsonreferences/architecture-decisions.mdreferences/candidate-audit.mdreferences/contract-example.jsonreferences/source-notes.mdreferences/verification-matrix.mdscripts/validate-contract.py

FAQ

Что делает скилл multiplayer-game-architecture?

Design and review the networking contract for multiplayer games before engine or backend implementation. Use when a team must choose dedicated-authoritative, listen-server, relay-assisted peer, lockstep, snapshot, or asynchronous models; assign authority for movement, combat, inventory, economy, and match state; plan prediction, reconciliation, interpolation, lag handling, matchmaking, reconnects, protocol versions, and cheat resistance; select WebSocket, WebRTC DataChannel, WebTransport, or an engine transport; or build a measured network impairment test matrix. Triggers on: multiplayer game, netcode, authoritative server, replication, rollback, host migration, client prediction, snapshot interpolation, lag compensation, matchmaking, WebSocket, WebRTC, WebTransport.

Как установить скилл multiplayer-game-architecture?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл multiplayer-game-architecture запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить multiplayer-game-architecture с