// the find
mas-bandwidth/yojimbo
A network library for client/server games written in C++
Yojimbo is a C++ game networking library built specifically for competitive multiplayer — think FPS servers, not turn-based lobbies. It handles the full stack from encrypted UDP packet transport through reliable/unreliable message channels, built by Glenn Fiedler (the person behind the classic 'Networking for Game Programmers' articles). If you have a custom C++ engine that needs production-grade networking, this is the serious option.
1. The layered architecture is clean: netcode handles auth tokens and connection, reliable handles packet ack/resend, serialize handles bit-packing — each is its own auditable library vendored in rather than a black box. 2. Connect token auth via libsodium (Curve25519 + ChaCha20-Poly1305) means you can issue short-lived tokens from a matchmaker service without the game server ever seeing credentials — the matcher/ directory even includes a working Go reference server. 3. Both channel types are genuinely useful: unreliable-unordered for player positions/inputs where freshness beats delivery, reliable-ordered for game events where you need exactly-once in order. 4. Built-in network simulator (yojimbo_network_simulator.cpp) lets you test under configurable latency, jitter, and packet loss without mocking your OS — this is the thing most homegrown networking skips and then regrets.
1. No CMake — build is Premake5 only, which is a non-starter for projects already on CMake or any CI pipeline that doesn't want to install another build tool. 2. The sodium/ directory is a hand-vendored partial libsodium with renamed symbols — this is a maintenance trap; when a libsodium CVE drops you won't get it from package managers, you'll have to manually diff and patch. 3. No bindings exist for any language except C++; if your game scripting layer is Lua, C#, or anything else, you're writing the FFI yourself. 4. Documentation is thin beyond the README — USAGE.md covers the basics but there's no API reference beyond the header files, and the examples (client.cpp, server.cpp) are functional but don't cover edge cases like server migration or connection recovery.