Skip to content

launch-it-labs/gameplumbingframework

Repository files navigation

Game Plumbing Framework (GPF) v1.0

Version Production Ready License Unity .NET Discord

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.


Key Features

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


Quick Example

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


Get Started in 30 Minutes

  1. Quick Start Guide - Build your first ServerObject
  2. Download Examples - Coin Flipper & Rock Paper Scissors projects
  3. Complete Documentation - Guides, API reference, tutorials

New to GPF? Start with:


Documentation

Quick Access

Core Guides

Browse Complete Documentation - All guides, API references, and tutorials


Downloads & Examples

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


Testing

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.


Community & Support

Getting Help

  • 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.


License

GPF is licensed under the MIT License. See LICENSE for details.


Ready to build? Start with Quick Start Guide

About

Game Plumbing Framework (GPF) is a real time server-authoritative C# game framework. It provides a backend infrastructure and reactive UI, addressing key challenges in C# game development by adding high performance scale and synchronization to an MVC inspired framework.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Contributors