finds.dev← search

// the find

name5566/leaf

★ 5,513 · Go · Apache-2.0 · updated May 2024

A game server framework in Go (golang)

Leaf is a modular game server framework for Go, built around goroutine-per-module isolation with message passing via channels. It targets multiplayer game backends where you want TCP/WebSocket handling, timer scheduling, and module communication without pulling in a massive framework. Documentation is primarily in Chinese.

The chanrpc package gives you a clean inter-module RPC pattern without shared memory — avoids the usual Go concurrency footguns in game server code. TCP and WebSocket servers are both first-class, with protobuf and JSON message processors included out of the box. The module/skeleton pattern enforces a consistent lifecycle (Init, Run, OnDestroy) that keeps large codebases from turning into goroutine soup. Timer implementation includes cron expression support, which is genuinely useful for game event scheduling.

Last meaningful commit is well over a year old and the README is nearly empty — no feature matrix, no architecture diagram, just a bullet list. The only real documentation is a tutorial in Chinese with an English translation that lags behind. MongoDB is the only included DB helper; if you're using Postgres or Redis you're on your own. No UDP support, which disqualifies it immediately for latency-sensitive games (shooters, real-time action) — it's TCP/WebSocket only.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →