Marketplace
networking-servers
Multiplayer systems, netcode, game servers, synchronization, and anti-cheat. Build scalable, responsive multiplayer experiences.
$ Instalar
git clone https://github.com/pluginagentmarketplace/custom-plugin-game-developer /tmp/custom-plugin-game-developer && cp -r /tmp/custom-plugin-game-developer/skills/networking-servers ~/.claude/skills/custom-plugin-game-developer// tip: Run this command in your terminal to install the skill
SKILL.md
name: networking-servers version: "2.0.0" description: | Multiplayer systems, netcode, game servers, synchronization, and anti-cheat. Build scalable, responsive multiplayer experiences. sasmp_version: "1.3.0" bonded_agent: 05-networking-multiplayer bond_type: PRIMARY_BOND
parameters:
- name: architecture type: string required: false validation: enum: [client_server, p2p, hybrid, dedicated]
- name: framework type: string required: false validation: enum: [photon, mirror, netcode, fishnet, custom]
retry_policy: enabled: true max_attempts: 5 backoff: exponential jitter: true
observability: log_events: [start, complete, error, reconnect] metrics: [latency_ms, packet_loss, bandwidth_kbps, player_count]
Networking & Game Servers
Network Architecture
CLIENT-SERVER (AUTHORITATIVE):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DEDICATED SERVER โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โข Authoritative game state โ โ
โ โ โข Physics simulation โ โ
โ โ โข Hit validation โ โ
โ โ โข Anti-cheat checks โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโ โโ โโ โโ โ
โ [Client A] [Client B] [Client C] [Client D] โ
โ โโ Prediction โโ Prediction โโ Prediction โโ Predictionโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Netcode Implementation
Client Prediction with Reconciliation
// โ
Production-Ready: Prediction + Reconciliation System
public class NetworkedMovement : NetworkBehaviour
{
private struct InputPayload
{
public uint Tick;
public uint Sequence;
public Vector2 MoveInput;
public bool Jump;
}
private Queue<InputPayload> _pendingInputs = new();
private CircularBuffer<PlayerState> _stateHistory;
private uint _inputSequence;
private void Update()
{
if (!IsOwner) return;
// Capture input
var input = new InputPayload
{
Tick = NetworkManager.ServerTime.Tick,
Sequence = _inputSequence++,
MoveInput = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical")),
Jump = Input.GetButtonDown("Jump")
};
// Predict locally (immediate response)
ApplyInput(input);
// Store for reconciliation
_pendingInputs.Enqueue(input);
_stateHistory.Add(GetCurrentState());
// Send to server
SendInputServerRpc(input);
}
[ClientRpc]
private void ReconcileClientRpc(uint ackedSequence, PlayerState serverState)
{
if (!IsOwner) return;
// Remove acknowledged inputs
while (_pendingInputs.Count > 0 && _pendingInputs.Peek().Sequence <= ackedSequence)
_pendingInputs.Dequeue();
// Check for prediction error
var predictedState = _stateHistory.Get(ackedSequence);
if (Vector3.Distance(predictedState.Position, serverState.Position) > 0.01f)
{
// Reconcile: reset to server state, replay pending inputs
SetState(serverState);
foreach (var input in _pendingInputs)
ApplyInput(input);
}
}
}
Lag Compensation
// โ
Production-Ready: Server-Side Rewind
public class LagCompensation : NetworkBehaviour
{
private const int HISTORY_SIZE = 128;
private const float MAX_REWIND_MS = 200f;
private CircularBuffer<PositionSnapshot>[] _playerHistory;
[ServerRpc]
public void RequestHitValidationServerRpc(uint shooterClientId,
Vector3 shootOrigin, Vector3 shootDirection, uint targetClientId)
{
// Get shooter's RTT
float rtt = NetworkManager.ConnectedClients[shooterClientId].RTT;
float rewindTime = Mathf.Min(rtt / 2f + 50f, MAX_REWIND_MS);
// Get target's position at that time
var targetPastPosition = GetPositionAtTime(targetClientId,
Time.time - (rewindTime / 1000f));
// Perform hit check at rewound position
if (Physics.Raycast(shootOrigin, shootDirection, out var hit))
{
if (Vector3.Distance(hit.point, targetPastPosition) < 1f)
{
// Valid hit - apply damage
ApplyDamage(targetClientId, 25);
}
}
}
}
Server Architecture
SCALABLE SERVER ARCHITECTURE:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LOAD BALANCER (Global) โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ MATCHMAKING SERVICE โ โ
โ โ โข Player queuing โ โ
โ โ โข Skill-based matching โ โ
โ โ โข Session creation โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ GAME SERVERS (Auto-scaled) โ โ
โ โ [US-East] [US-West] [EU] [Asia] โ โ
โ โ Each region: 10-1000 instances โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ DATABASE CLUSTER โ โ
โ โ โข Player profiles โ โ
โ โ โข Match history โ โ
โ โ โข Leaderboards โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Bandwidth Optimization
| Technique | Savings | Implementation |
|---|---|---|
| Delta Compression | 60-80% | Only send changed values |
| Quantization | 50-70% | Float โ fixed-point |
| Bit Packing | 30-50% | Custom serialization |
| Interest Management | 70-90% | Only send relevant data |
| Priority Queue | Variable | Less important = less often |
Anti-Cheat Strategies
ANTI-CHEAT LAYERS:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LAYER 1: Server Authority โ
โ โ All game state validated on server โ
โ โ Never trust client โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ LAYER 2: Sanity Checks โ
โ โ Movement speed limits โ
โ โ Action rate limits โ
โ โ Position validation โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ LAYER 3: Statistical Detection โ
โ โ Inhuman accuracy patterns โ
โ โ Impossible reaction times โ
โ โ Abnormal session metrics โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ LAYER 4: Client-Side (Optional) โ
โ โ Memory scanning (EAC, BattlEye) โ
โ โ Process monitoring โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ง Troubleshooting
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PROBLEM: Players rubber-banding / teleporting โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ SOLUTIONS: โ
โ โ Increase interpolation buffer โ
โ โ Add jitter buffer for packets โ
โ โ Smooth corrections (lerp, not snap) โ
โ โ Check prediction code determinism โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PROBLEM: Desyncs between clients โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ SOLUTIONS: โ
โ โ Use fixed-point math โ
โ โ Sync random seeds โ
โ โ Periodic full-state resync โ
โ โ State hash comparison โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PROBLEM: High bandwidth usage โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ SOLUTIONS: โ
โ โ Implement delta compression โ
โ โ Reduce tick rate for non-critical data โ
โ โ Use interest management โ
โ โ Quantize position/rotation values โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Framework Comparison
| Framework | Best For | Max Players | Learning Curve |
|---|---|---|---|
| Photon | Quick start | 16-32 | Easy |
| Mirror | Open source | 100+ | Medium |
| Netcode for GO | Unity official | 100+ | Medium |
| FishNet | Performance | 200+ | Medium |
| Custom | Full control | Unlimited | Hard |
Use this skill: When building multiplayer, designing servers, or implementing anti-cheat.
Repository

pluginagentmarketplace
Author
pluginagentmarketplace/custom-plugin-game-developer/skills/networking-servers
1
Stars
0
Forks
Updated3d ago
Added1w ago