mcpField
M
multiplayer-building

multiplayer-building

github.com/bbeierle12Development966 installsUpdated 1d ago
Repository

About multiplayer-building

A networking layer for multiplayer building games, aimed at games that need server-authoritative placement with client prediction. It combines state deltas, reconciliation, and configurable handling of simultaneous builds.

Key features

  1. 01Server-authoritative building state
  2. 02Client prediction with rollback
  3. 03Delta compression for changed state
  4. 04Conflict resolution strategies

Use cases

  1. 01Syncing structure changes across players
  2. 02Predicting placements before server confirmation
  3. 03Resolving simultaneous building attempts

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bbeierle12/skill-mcp-claude --skill multiplayer-building

After installing, type/multiplayer-buildingin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

_meta.json
references/
multiplayer-networking.md
scripts/
building-network-manager.js
client-prediction.js
conflict-resolver.js
delta-compression.js

Details

From the project README

Multiplayer Building

Networking layer for multiplayer building games.

Quick Start

import { BuildingNetworkServer, BuildingNetworkClient } from './scripts/building-network-manager.js';

// Server
const server = new BuildingNetworkServer(buildingSystem, {
  tickRate: 20,
  conflictStrategy: 'first_write'
});
server.start();

// Client
const client = new BuildingNetworkClient(buildingSystem);
client.connect('ws://server:8080');
const localPiece = client.placeRequest('wall', position, rotation);

Reference

See references/multiplayer-networking.md for:

  • Authority model comparison
  • Delta compression strategy
  • Conflict resolution approaches
  • Large structure synchronization

Scripts

  • scripts/delta-compression.js - Only sync changed state (Source engine pattern)
  • scripts/client-prediction.js - Optimistic placement with rollback
  • scripts/conflict-resolver.js - Handle simultaneous builds (first-write, timestamp, lock-based)
  • scripts/building-network-manager.js - Complete server/client system

Architecture

Server-authoritative with client prediction:

  1. Client predicts placement locally (ghost piece)
  2. Server validates and confirms/rejects
  3. Client reconciles with server state
  4. Delta compression syncs only changes

Comments

Markdown supported