multiplayer

A guide to designing multiplayer games, covering server architecture, keeping game state synchronized across players, network efficiency, delay handling, and anti-cheat checks.

In plain words
What is it for?
Use it to plan client-server or host-based networking, synchronize state or input, reduce bandwidth, handle lag, and validate player actions.
Why use it?
It helps choose how players connect and how the server and clients share game information. It explains trade-offs such as latency, cost, security, and the needs of real-time, cooperative, turn-based, or large games.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/misonl/ling/multiplayer
Any agent
npx skills add MisonL/Ling --skill multiplayer
Clone the repo
git clone --depth 1 https://github.com/MisonL/Ling

Made for: Claude Code, Codex.

Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 869 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00869
Opus 5 $0.00008 $0.00434
Sonnet 5 $0.00003 $0.00174
Haiku 4.5 $0.00002 $0.00087

Measured 2d ago against content hash 9273442fc1bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

multiplayer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/game-development/multiplayer/SKILL.md · 133 lines

What it actually says

多人游戏开发

网络架构与同步原则。


1. 架构选择

决策树

什么类型的多人游戏?
|
+-- 竞技 / 实时
|   +-- Dedicated Server(专用服务器,权威)
|
+-- 合作 / 休闲
|   +-- Host-based(基于主机,一个玩家作为服务器)
|
+-- 回合制
|   +-- Client-server(客户端-服务器,简单)
|
+-- 大型(MMO)
    +-- 分布式服务器

比较

架构 延迟 成本 安全性
Dedicated(专用)
P2P 可变
Host-based(主机)

2. 同步原则

状态 vs 输入

方法 同步什么 最适合
State Sync(状态同步) 游戏状态 简单、对象少
Input Sync(输入同步) 玩家输入 动作游戏
Hybrid(混合) 两者 大多数游戏

延迟补偿

技术 目的
Prediction(预测) 客户端预测服务器
Interpolation(插值) 平滑远程玩家
Reconciliation(和解) 修正错误预测
Lag compensation(延迟补偿) 回滚以进行命中检测

3. 网络优化

带宽减少

技术 节省
Delta compression(增量压缩) 仅发送变化
Quantization(量化) 降低精度
Priority(优先级) 重要数据优先
Area of interest(兴趣区域) 仅附近实体

更新率

类型 速率
位置 20-60 Hz
生命值 变化时
库存 变化时
聊天 发送时

4. 安全原则

服务器权威

客户端: "我击中了敌人"
服务器: 验证 -> 抛射物真的击中了吗?
         -> 玩家处于有效状态吗?
         -> 时间上可能吗?

反作弊

作弊 预防
Speed hack(速度挂) 服务器验证移动
Aimbot(自瞄) 服务器验证视线
Item dupe(复制物品) 服务器拥有库存
Wall hack(透视) 不发送隐藏数据

5. 匹配

考量因素

因素 影响
Skill(技能) 公平比赛
Latency(延迟) 可玩的连接
Wait time(等待时间) 玩家耐心
Party size(队伍大小) 组队游玩

6. 反模式

[FAIL] 禁止 [OK] 推荐
信任客户端 服务器是权威
发送一切 仅发送必要的
忽略延迟 为 100-200ms 设计
同步精确位置 插值/预测

记住: 永远不要信任客户端。服务器是真理之源。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 133 lines · 15 tokens per session scan A 9273442fc1bb

Subscribe to this mod's changes

multiplayer is a skill published in the GitHub repository MisonL/Ling (9 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 869 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens