goworld is a free, open source gaming project written in Go and released under Apache-2.0. It has 2,718 GitHub stars, 474 forks and 27 open issues, and was last pushed 10 months ago. On this registry it ranks #21 of 22 tracked projects in Gaming, with 5 head-to-head comparisons available.

What is goworld?

GoWorld is an Apache-2.0 licensed, scalable distributed game server engine written in Go, with hot swapping of game logic, aimed at developers and studios that run persistent multiplayer game worlds.

What it is

GoWorld is a game server engine written in the Go programming language and released under the Apache-2.0 licence. It adopts an entity framework, in which entities represent all players, monsters and NPCs. Entities in the same space can visit each other directly by calling methods or accessing attributes, while entities in different spaces call each other using RPC. A running server consists of one dispatcher, one or more games and one or more gates: the gates handle client connections and receive and send packets from and to clients, the games manage all entities and run all game logic, and the dispatcher redirects packets among games and between games and gates.

The concrete problem it solves is twofold. Capacity is addressed by distribution, since server capacity is increased by using more machines instead of scaling one process. Deployment is addressed by hot swapping: the game processes are hot-swappable, and a game can be swapped by sending SIGHUP to the process and restarting it with the -restore parameter to bring the game back to work with the latest executable image. That replaces stopping a game server, shipping a new build and reconnecting players, because server-side logic can be updated and server bugs fixed transparently without significant interference of online players.

Key capabilities

  • Spaces and entities are managed by the engine with AOI (area of interest) support.
  • The architecture is distributed, so capacity grows by using more machines.
  • Game processes are hot-swappable through SIGHUP and a restart with the -restore parameter.
  • Clients can connect over TCP, KCP or WebSocket.
  • Traffic between clients and servers can be compressed and encrypted.
  • Entities within one space are reached by direct method calls and attribute access; entities in different spaces use RPC.
  • A chatroom demo and a Unity demo (GoWorldUnityDemo.zip) are included.

Who uses it and how

  • Teams building persistent multiplayer worlds with shared spaces, where AOI and space/entity management matter; the tutorial series covers movement synchronization and AOI alongside login, registration and storage.
  • Live-service teams that need to ship logic changes to running games, using the documented SIGHUP plus -restore swap rather than taking the game down.
  • Chat applications, covered by the chatroom demo and a walkthrough for building a distributed chat server, including a multi-channel chatroom.
  • Unity client projects, supported by the Unity demo download and a tutorial on dual-end debugging of the Unity example.
  • Chinese-speaking developers, served by Chinese documentation on GoDoc, a directory structure wiki page, a ten-part Zhihu tutorial series and a QQ group for Go server development exchange.

Getting started

GoWorld is obtained and run as a Go project at the package path github.com/xiaonanln/goworld, with the README's "Get GoWorld" and "Manage GoWorld Servers" sections covering installation, running and management. Chatroom and Unity demos are provided as starting points.

How it compares

The facts supplied here name neither paid products that GoWorld replaces nor comparable game server engines to measure it against, so in this registry it stands alone. What can be said is confined to its own terms: it is Apache-2.0 licensed, self-hosted Go software that scales by running one dispatcher with one or more game processes and one or more gates across more machines.

When to use it — and when not to

A self-hoster must operate a cluster of cooperating processes rather than a single binary: one dispatcher, one or more games and one or more gates, spread across machines as capacity grows, with updates delivered by restarting a game process with -restore rather than by patching it in memory. It is a poor fit for teams that want a managed backend, or whose server-side logic is not written in Go, since game logic runs inside the engine's Go processes. The clearest weakness is documentation: the README excerpt is sparse and much of the substantive material is in Chinese, and while 2,718 stars, 474 forks and a last push on 14 November 2025 indicate an active project, its English-language material is thin relative to its scope.

project readme (upstream, from github) — read inline

GoWorld

Scalable Distributed Game Server Engine with Hot Reload in Golang

GoDoc Build Status Go Report Card codecov ApacheLicense


中文资料

中文文档
游戏服务器介绍
目录结构说明
使用GoWorld轻松实现分布式聊天服务器

游戏服务端开源引擎GoWorld教程

1.安装和运行
2.Unity示例双端联调
3.手把手写一个聊天室
4.多个频道的聊天室
5.登录注册和存储
6.移动同步和AOI
7.源码解析之启动流程和热更新
8.码解析之gate
9.源码解析之dispatcher
10.源码解析之entity


欢迎加入Go服务端开发交流群:662182346


Features

  • Spaces & Entities: manage multiple spaces and entities with AOI support
  • Distributed: increase server capacity by using more machines
  • Hot-Swappable: update game logic by restarting server process
  • Multiple Communication Protocols: supports TCP, KCP and WebSocket
  • Traffic Compression & Encryption: traffic between clients and servers can be compressed and encrypted

Architecture

GoWorld Architecture

Introduction

GoWorld server adopts an entity framework, in which entities represent all players, monsters, NPCs. Entities in the same space can visit each other directly by calling methods or access attributes. Entities in different spaces can call each over using RPC.

A GoWorld server consists of one dispatcher, one or more games and one or more gates. The gates are responsible for handling client connections and receive/send packets from/to clients. The games manages all entities and runs all game logic. The dispatcher is responsible for redirecting packets among games and between games and gates.

The game processes are hot-swappable. We can swap a game by sending SIGHUP to the process and restart the process with -restore parameter to bring game back to work but with the latest executable image. This feature enables updating server-side logic or fixing server bugs transparently without significant interference of online players.

Installing GoWorld

GoWorld requries Go 1.11+ to install.

go install github.com/xiaonanln/goworld/cmd/...

Manage GoWorld Servers

Use command goworld to build, start, stop and reload game servers.

Build Example Chatroom Server:

$ goworld build examples/chatroom_demo

Start Example Chatroom Server: (dispatcher -> game -> gate)

$ goworld start examples/chatroom_demo

Stop Game Server (gate -> game -> dispatcher):

$ goworld stop examples/chatroom_demo

Reload Game Servers:

$ goworld reload examples/chatroom_demo

Reload will reboot game processes with the current executable while preserving all game server states. However, it does not work on Windows.

List Server Processes:

$ goworld status examples/chatroom_demo
> 1 dispatcher running, 1/1 gates running, 1/1 games (examples/chatroom_demo) running
> 	2763      dispatcher      /home/ubuntu/go/src/github.com/xiaonanln/goworld/components/dispatcher/dispatcher -dispid 1
> 	2770      chatroom_demo   /home/ubuntu/go/src/github.com/xiaonanln/goworld/examples/chatroom_demo/chatroom_demo -gid 1
> 	2779      gate            /home/ubuntu/go/src/github.com/xiaonanln/goworld/components/gate/gate -gid 1

Demos

Chatroom Demo

The chatroom demo is a simple implementation of chatroom server and client. It illustrates how GoWorld can also be used for games which don't divide players by spaces.

The chatroom demo provides following features:

  • register & login
  • send chat message
  • switch chatrooms

Build Server:

goworld build examples/chatroom_demo

Run Server:

goworld start examples/chatroom_demo

Chatroom Demo Client:

Chatroom demo client implements the client-server protocol in Javascript.
The client for chatroom demo is hosted at github.com/xiaonanln/goworld-chatroom-demo-client. The project was created and built in Cocos Creater 1.5.

Unity Demo

Unity Demo is a simple multiple player monster shooting game to show how spaces and entities of GoWorld can be used to create multiple player online games.

  • register & login
  • move players in space
  • summon monsters
  • player shoot monsters
  • monsters attack players

Developing features:

  • Hit effects
  • Players migrate among multiple spaces
  • Server side map navigation

Build Server:

goworld build examples/unity_demo

Run Server:

goworld start examples/unity_demo

Unity Demo Client:

Unity demo client implements the client-server protocol in C#. The client for unity demo is hosted at https://github.com/xiaonanln/goworld-unity-demo. The project was created and built in Unity 2017.1.

You can try the demo by downloading GoWorldUnityDemo.zip. The demo connects to a goworld server on Huawei Cloud instance.

Frequently asked questions

Is goworld free to use?

goworld is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does goworld do?

Scalable Distributed Game Server Engine with Hot Swapping in Golang

What is goworld written in?

goworld is primarily written in Go. Its source is publicly available at https://github.com/xiaonanln/goworld, and it has 2,718 GitHub stars.