Multiplayer game development principles. Architecture, networking, synchronization.
Add this skill
npx mdskills install sickn33/multiplayerStrong reference guide for multiplayer concepts but lacks actionable agent instructions
1---2name: multiplayer3description: Multiplayer game development principles. Architecture, networking, synchronization.4allowed-tools: Read, Write, Edit, Glob, Grep, Bash5---67# Multiplayer Game Development89> Networking architecture and synchronization principles.1011---1213## 1. Architecture Selection1415### Decision Tree1617```18What type of multiplayer?19│20├── Competitive / Real-time21│ └── Dedicated Server (authoritative)22│23├── Cooperative / Casual24│ └── Host-based (one player is server)25│26├── Turn-based27│ └── Client-server (simple)28│29└── Massive (MMO)30 └── Distributed servers31```3233### Comparison3435| Architecture | Latency | Cost | Security |36|--------------|---------|------|----------|37| **Dedicated** | Low | High | Strong |38| **P2P** | Variable | Low | Weak |39| **Host-based** | Medium | Low | Medium |4041---4243## 2. Synchronization Principles4445### State vs Input4647| Approach | Sync What | Best For |48|----------|-----------|----------|49| **State Sync** | Game state | Simple, few objects |50| **Input Sync** | Player inputs | Action games |51| **Hybrid** | Both | Most games |5253### Lag Compensation5455| Technique | Purpose |56|-----------|---------|57| **Prediction** | Client predicts server |58| **Interpolation** | Smooth remote players |59| **Reconciliation** | Fix mispredictions |60| **Lag compensation** | Rewind for hit detection |6162---6364## 3. Network Optimization6566### Bandwidth Reduction6768| Technique | Savings |69|-----------|---------|70| **Delta compression** | Send only changes |71| **Quantization** | Reduce precision |72| **Priority** | Important data first |73| **Area of interest** | Only nearby entities |7475### Update Rates7677| Type | Rate |78|------|------|79| Position | 20-60 Hz |80| Health | On change |81| Inventory | On change |82| Chat | On send |8384---8586## 4. Security Principles8788### Server Authority8990```91Client: "I hit the enemy"92Server: Validate → did projectile actually hit?93 → was player in valid state?94 → was timing possible?95```9697### Anti-Cheat9899| Cheat | Prevention |100|-------|------------|101| Speed hack | Server validates movement |102| Aimbot | Server validates sight line |103| Item dupe | Server owns inventory |104| Wall hack | Don't send hidden data |105106---107108## 5. Matchmaking109110### Considerations111112| Factor | Impact |113|--------|--------|114| **Skill** | Fair matches |115| **Latency** | Playable connection |116| **Wait time** | Player patience |117| **Party size** | Group play |118119---120121## 6. Anti-Patterns122123| ❌ Don't | ✅ Do |124|----------|-------|125| Trust the client | Server is authority |126| Send everything | Send only necessary |127| Ignore latency | Design for 100-200ms |128| Sync exact positions | Interpolate/predict |129130---131132> **Remember:** Never trust the client. The server is the source of truth.133
Full transparency — inspect the skill content before installing.