Agent Skillsvudovn/ag-kit › multiplayer

multiplayer

GitHub

提供多人游戏开发的核心原则,涵盖网络架构选择、状态同步、延迟补偿、带宽优化及服务器权威与安全机制,辅助开发者构建稳定可靠的联机体验。

.agents/skills/game-development/multiplayer/SKILL.md vudovn/ag-kit

触发场景

询问多人游戏架构选型 需要实现游戏状态同步或延迟补偿 优化网络带宽与数据包传输 设计反作弊与服务端校验逻辑

安装

npx skills add vudovn/ag-kit --skill multiplayer -g -y
更多选项

非标准路径

npx skills add https://github.com/vudovn/ag-kit/tree/main/.agents/skills/game-development/multiplayer -g -y

不安装直接使用

npx skills use vudovn/ag-kit@multiplayer

指定 Agent (Claude Code)

npx skills add vudovn/ag-kit --skill multiplayer -a claude-code -g -y

安装 repo 全部 skill

npx skills add vudovn/ag-kit --all -g -y

预览 repo 内 skill

npx skills add vudovn/ag-kit --list

SKILL.md

Frontmatter
{
    "name": "multiplayer",
    "description": "Multiplayer game development principles. Architecture, networking, synchronization.",
    "allowed-tools": "Read, Write, Edit, Glob, Grep, Bash"
}

Multiplayer Game Development

Networking architecture and synchronization principles.


1. Architecture Selection

Decision Tree

What type of multiplayer?
│
├── Competitive / Real-time
│   └── Dedicated Server (authoritative)
│
├── Cooperative / Casual
│   └── Host-based (one player is server)
│
├── Turn-based
│   └── Client-server (simple)
│
└── Massive (MMO)
    └── Distributed servers

Comparison

Architecture Latency Cost Security
Dedicated Low High Strong
P2P Variable Low Weak
Host-based Medium Low Medium

2. Synchronization Principles

State vs Input

Approach Sync What Best For
State Sync Game state Simple, few objects
Input Sync Player inputs Action games
Hybrid Both Most games

Lag Compensation

Technique Purpose
Prediction Client predicts server
Interpolation Smooth remote players
Reconciliation Fix mispredictions
Lag compensation Rewind for hit detection

3. Network Optimization

Bandwidth Reduction

Technique Savings
Delta compression Send only changes
Quantization Reduce precision
Priority Important data first
Area of interest Only nearby entities

Update Rates

Type Rate
Position 20-60 Hz
Health On change
Inventory On change
Chat On send

4. Security Principles

Server Authority

Client: "I hit the enemy"
Server: Validate → did projectile actually hit?
         → was player in valid state?
         → was timing possible?

Anti-Cheat

Cheat Prevention
Speed hack Server validates movement
Aimbot Server validates sight line
Item dupe Server owns inventory
Wall hack Don't send hidden data

5. Matchmaking

Considerations

Factor Impact
Skill Fair matches
Latency Playable connection
Wait time Player patience
Party size Group play

6. Anti-Patterns

❌ Don't ✅ Do
Trust the client Server is authority
Send everything Send only necessary
Ignore latency Design for 100-200ms
Sync exact positions Interpolate/predict

Remember: Never trust the client. The server is the source of truth.

版本历史

  • 211561c 当前 2026-08-20 11:38

同 Skill 集合

.agents/skills/api-patterns/SKILL.md
.agents/skills/app-builder/SKILL.md
.agents/skills/app-builder/templates/SKILL.md
.agents/skills/architecture/SKILL.md
.agents/skills/bash-linux/SKILL.md
.agents/skills/batch-operations/SKILL.md
.agents/skills/behavioral-modes/SKILL.md
.agents/skills/brainstorming/SKILL.md
.agents/skills/clean-code/SKILL.md
.agents/skills/code-review-checklist/SKILL.md
.agents/skills/code-review-graph/SKILL.md
.agents/skills/context-compression/SKILL.md
.agents/skills/coordinator-mode/SKILL.md
.agents/skills/database-design/SKILL.md
.agents/skills/deployment-procedures/SKILL.md
.agents/skills/design-spec/SKILL.md
.agents/skills/documentation-templates/SKILL.md
.agents/skills/frontend-architecture/SKILL.md
.agents/skills/frontend-design/SKILL.md
.agents/skills/game-development/2d-games/SKILL.md
.agents/skills/game-development/3d-games/SKILL.md
.agents/skills/game-development/game-art/SKILL.md
.agents/skills/game-development/game-audio/SKILL.md
.agents/skills/game-development/game-design/SKILL.md
.agents/skills/game-development/mobile-games/SKILL.md
.agents/skills/game-development/pc-games/SKILL.md
.agents/skills/game-development/SKILL.md
.agents/skills/game-development/vr-ar/SKILL.md
.agents/skills/game-development/web-games/SKILL.md
.agents/skills/geo-fundamentals/SKILL.md
.agents/skills/i18n-localization/SKILL.md
.agents/skills/intelligent-routing/SKILL.md
.agents/skills/lint-and-validate/SKILL.md
.agents/skills/mcp-builder/SKILL.md
.agents/skills/memory-system/SKILL.md
.agents/skills/mobile-design/SKILL.md
.agents/skills/nextjs-react-expert/SKILL.md
.agents/skills/nodejs-best-practices/SKILL.md
.agents/skills/parallel-agents/SKILL.md
.agents/skills/performance-profiling/SKILL.md
.agents/skills/plan-writing/SKILL.md
.agents/skills/powershell-windows/SKILL.md
.agents/skills/python-patterns/SKILL.md
.agents/skills/red-team-tactics/SKILL.md
.agents/skills/rust-pro/SKILL.md
.agents/skills/seo-fundamentals/SKILL.md
.agents/skills/server-management/SKILL.md
.agents/skills/simplify-code/SKILL.md
.agents/skills/skillify/SKILL.md

元信息

文件数
0
版本
211561c
Hash
79ee8d6f
收录时间
2026-08-20 11:38

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 16:00
浙ICP备14020137号-1 $访客地图$