跳到正文
cccskills
免费在 GitHub 公开

multiplayer

Multiplayer game development principles. Architecture, networking, synchronization.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md2.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

ArchitectureLatencyCostSecurity
DedicatedLowHighStrong
P2PVariableLowWeak
Host-basedMediumLowMedium

2. Synchronization Principles

State vs Input

ApproachSync WhatBest For
State SyncGame stateSimple, few objects
Input SyncPlayer inputsAction games
HybridBothMost games

Lag Compensation

TechniquePurpose
PredictionClient predicts server
InterpolationSmooth remote players
ReconciliationFix mispredictions
Lag compensationRewind for hit detection

3. Network Optimization

Bandwidth Reduction

TechniqueSavings
Delta compressionSend only changes
QuantizationReduce precision
PriorityImportant data first
Area of interestOnly nearby entities

Update Rates

TypeRate
Position20-60 Hz
HealthOn change
InventoryOn change
ChatOn 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

CheatPrevention
Speed hackServer validates movement
AimbotServer validates sight line
Item dupeServer owns inventory
Wall hackDon't send hidden data

5. Matchmaking

Considerations

FactorImpact
SkillFair matches
LatencyPlayable connection
Wait timePlayer patience
Party sizeGroup play

6. Anti-Patterns

❌ Don't✅ Do
Trust the clientServer is authority
Send everythingSend only necessary
Ignore latencyDesign for 100-200ms
Sync exact positionsInterpolate/predict

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

2d-games

免费

2D game development principles. Sprites, tilemaps, physics, camera.

中文简介正在准备中。当前显示原文说明。

umairinayat/Specter-AI192026年9月29日 更新

3d-games

免费

3D game development principles. Rendering, shaders, physics, cameras.

中文简介正在准备中。当前显示原文说明。

umairinayat/Specter-AI192026年9月29日 更新

API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.

中文简介正在准备中。当前显示原文说明。

umairinayat/Specter-AI192026年9月29日 更新

Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.

中文简介正在准备中。当前显示原文说明。

umairinayat/Specter-AI192026年9月29日 更新

Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.

中文简介正在准备中。当前显示原文说明。

umairinayat/Specter-AI192026年9月29日 更新

Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

中文简介正在准备中。当前显示原文说明。

umairinayat/Specter-AI192026年9月29日 更新

查看 umairinayat 的全部技能

报告此技能的问题