multiplayer
できること
オンラインで複数の人が一緒に遊べるゲームを作るための考え方を解説します。プレイヤー同士を接続するさまざまな方法と、全員にとって公平なゲームを保つ方法を説明します。
使う場面
- ✓ゲーム内でプレイヤーをどのように接続するかを選ぶとき。
- ✓プレイヤーの操作を全員の画面に正しく表示させる方法を決めるとき。
- ✓オンラインゲームでのチート行為を防ぐ方法を考えるとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/game-development/multiplayer/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“オンラインのレースゲームを作りたいのですが、プレイヤー同士を接続する最適な方法は何ですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
このAIは、作りたいゲームの種類を分析して、プレイヤーを接続する最適な方法を提案します。また、インターネットの遅延があっても、各プレイヤーの操作が全員に正しく表示されるようにする方法も説明します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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 | Region and load dependent | Hosting dependent | Can enforce server authority |
| P2P | Topology dependent | Relay costs may apply | Peers require validation |
| Host-based | Host location dependent | Relay costs may apply | Host remains a trust boundary |
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 | Validate legal shots; this alone does not detect automated aiming |
| 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.
When to Use
Use when selecting multiplayer authority, synchronizing state, testing latency compensation, or preventing inventory duplication.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Verification
Treat tables as design starting points, not guarantees. Prototype the selected mechanic, test accessibility and recovery paths, and measure frame timing, memory and behavior on target hardware before claiming completion. Store submission and licensing requirements must be checked against current official platform documentation.
よくある質問
「専用サーバー」とは何ですか?
ゲームを制御し、公平性を保証する中央のコンピューターのことです。すべての判断の基準となる主導的な役割を担います。
「同期」とは何ですか?
すべてのプレイヤーが、ゲーム内で同じ出来事を同じタイミングで見られるようにする仕組みのことです。
プレイヤーの報告をそのまま信じてはいけないのはなぜですか?
プレイヤーが実際には行っていないことを行ったと偽って、不正をしようとする可能性があるからです。サーバー側ですべての内容を検証する必要があります。
詳細
作者による元の説明
Multiplayer game development principles. Architecture, networking, synchronization.
人気
- GitHubのスター
- 48k
- ランキング
- #4689
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。