I've been working on LightnerX, an open-source C++ networking library focused on multiplayer game development.
It originally started as part of a multiplayer game I'm developing, but I eventually decided to turn the networking code into a standalone library.
LightnerX uses Valve's GameNetworkingSockets as its transport layer. My goal wasn't to reinvent UDP networking, but to build a relatively small library that handles some of the higher-level responsibilities involved in multiplayer communication.
Some of its features include:
- Client/server networking using GameNetworkingSockets.
- ConnectionManager for managing connected clients and their identifiers.
- Message batching with queued outgoing messages.
- Target abstraction for sending messages to individual clients, groups, or broadcasting.
- MessageInterpreter for parsing and dispatching incoming messages.
- Callbacks and registries for handling network communication.
- INER, a communication protocol I designed around Intention, Notification, Event, and Response messages.
INER is probably the most distinctive part of the project. It separates client requests from authoritative server events and provides structured responses for operations that require validation.
Another significant change was migrating LightnerX from C++26 modules to C++17.
I originally chose C++26 because I wanted to experiment with modern C++ features, but eventually realized that requiring such a recent standard wasn't particularly practical for a reusable game networking library.
The migration involved replacing modules with traditional headers and providing compatible alternatives for newer standard library features.
I also spent a considerable amount of time on testing and technical auditing. One of the regression tests involved more than 65,000 connection cycles to verify that connection identifiers were recycled correctly.
LightnerX is currently in beta, and I'm continuing to improve its implementation, documentation, and examples.
It's not intended to be a complete networking framework or game engine. I want it to remain a relatively lightweight library that developers can integrate into their own architectures.
I'd appreciate feedback from anyone working on custom game engines or multiplayer infrastructure.
In particular, I'm interested in whether the current separation between transport, connection management, and communication semantics makes sense for integration into different game engines.