Game Plumbing Framework (GPF) is a server-authoritative framework for building multiplayer games and real-time applications in C#. GPF eliminates about 80% of traditional backend code: the REST endpoints, manual state synchronization, and persistence layers that slow development. Instead, you write testable server logic that runs locally with full debugging support, and GPF handles the rest automatically: persistence, networking, synchronization, and scaling.
This framework has been deployed in commercial applications serving professional users and tested by security professionals. The code runs in production today.
The framework handles several things automatically:
- Less boilerplate - Skip writing REST APIs, sync logic, and persistence layers
- Server authority - Game logic runs server-side to prevent cheating
- Automatic persistence - Game state saves automatically without extra code
- Real-time sync - State changes broadcast to clients with ultra-low latency
- Reactive UI - Views update automatically when game state changes
- Client-side prediction - Built-in middleware for optimistic updates
- Horizontal scaling - Automatically distributes load across instances
- Full-stack debugging - Fully simulated backend runs inside Unity with breakpoints
- Direct deployment - One-click deployment from Unity Editor to the cloud
- Production ready - Currently deployed in commercial applications, v1.0 stable
See complete feature list and comparisons
A traditional server implementation of this coin flip game requires ~110 lines: REST endpoints, database queries, WebSocket event handling, state validation, and broadcasting logic.
GPF does it in 20 lines (82% less code):
[Register("player"), Syncable, DataStorePath("players")]
public class CoinPlayerSO : ServerObject
{
public int streak = 0;
public bool isFlipping = false;
public class Flip : ServerObjectMessage { }
[FromClient] // Client sends flip gesture
private void Handler(Flip msg) {
if (!isFlipping) {
isFlipping = true;
this.Send(this.Id, new FlipResult(), delaySeconds: 1);
}
}
public class FlipResult : ServerObjectMessage { public bool isHeads; }
[MessageHook] // Server generates random value
private void Hook(FlipResult msg, HookContext ctx) {
msg.isHeads = ctx.Random(0, 2) == 0;
}
private void Handler(FlipResult msg) {
isFlipping = false;
if (msg.isHeads) streak++;
else streak = 0;
}
}What's happening here:
- Client sends only the gesture (flip button press)
- Server enforces timing (prevents rapid-fire cheating)
- Server generates the random result (can't be manipulated by client)
- State syncs to all clients in real-time
- Everything persists automatically
GPF automatically handles:
- Persistence - Streak auto-saves to your datastore
- Synchronization - Changes broadcast to all clients in real-time
- UI updates - Views refresh automatically when data changes
- Networking - Bidirectional communication with automatic reconnection
- Validation - Type-safe messages prevent malformed data
- Scaling - Load distributes across server instances
In practice, this means you write game logic and skip the infrastructure code. When we deployed our first production app with GPF, we cut about two weeks of backend work down to a few hours.
See the code reduction breakdown
- Quick Start Guide - Build your first ServerObject
- Download Examples - Coin Flipper & Rock Paper Scissors projects
- Complete Documentation - Guides, API reference, tutorials
New to GPF? Start with:
- Why GPF? Decision Guide - Determine if GPF fits your project
- Glossary - Understand GPF terminology
- Architecture Overview - Core patterns
- Quick Start - 30-minute tutorial
- Cheat Sheet - One-page syntax reference
- Glossary - Terminology reference
- Architectural Patterns - PlayerSO, View, Singleton patterns
- ServerObject Guide - Complete SO reference
- ViewBindings Guide - Connect data to UI
- Security Guide - Prevent vulnerabilities
- Testing Guide - MockCloud, unit tests
- Deployment Guide - AWS deployment
Browse Complete Documentation - All guides, API references, and tutorials
| Project | Description | Download |
|---|---|---|
| GPF Starter Package | HelloWorld project + framework | Download Unity Package |
| Coin Flipper | Single-player with leaderboard | Download |
| Rock Paper Scissors | Multiplayer matchmaking | Download |
See Downloads Page for setup instructions
GPF includes 200+ automated tests covering connection resilience, authentication, data synchronization, client-side prediction, ServerObject behavior, and more. All tests run in Unity Test Runner and via .NET test framework.
See Testing Guide for how to run tests.
- Discord (Recommended) - Active community for questions, discussions, and support
#general- General discussion and questions#help- Get help with implementation issues#showcase- Share your projects built with GPF#contributors- Framework development discussion
- GitHub Issues - Report bugs or request features
Need help? Join our Discord #help channel or check the documentation.
GPF is licensed under the MIT License. See LICENSE for details.
Ready to build? Start with Quick Start Guide