explaingit

cloudwu/skynet

14,038CAudience · developerComplexity · 4/5Setup · hard

TLDR

A C and Lua server framework for building online multiplayer games, using isolated services that communicate by passing messages so thousands of players can be handled concurrently.

Mindmap

mindmap
  root((skynet))
    Architecture
      Actor model
      Message passing
      Concurrent services
    Tech stack
      C core
      Lua scripting
      jemalloc memory
    Use cases
      Game servers
      Online multiplayer
      Server applications
    Getting started
      Build with make
      Example configs
      Gate server test
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a game server that handles many concurrent players using Lua for game logic and C for performance

USE CASE 2

Run a gate server that routes player connections to separate game services

USE CASE 3

Write concurrent server code where each component is isolated and communicates by passing messages

USE CASE 4

Test a basic multiplayer server setup using the included example configurations right after building

Tech stack

CLuajemalloc

Getting it running

Difficulty · hard Time to first run · 1h+

Requires Linux, macOS, or FreeBSD, no Windows support. autoconf must be installed before building because Skynet uses jemalloc for memory management.

Check the repository for specific license terms.

In plain English

Skynet is a lightweight framework for building online multiplayer games and server-side applications. It is written in C and uses Lua as its scripting language. The framework is built around the actor model, which is an approach to organizing concurrent code where individual components called services communicate by passing messages rather than sharing memory directly. This makes it easier to reason about what each piece of code is doing without worrying about conflicting access to shared state. The project is widely used in the Chinese game industry and the README notes it has been spreading to other industries and to developers outside China. The community is described as friendly and mostly able to communicate in English, so questions can be posted in English via the GitHub Discussions tab or as GitHub issues. Most related documentation sites are in Chinese but the README suggests using Google Translate or DeepL. Building Skynet requires Linux, macOS, or FreeBSD. You clone the repository and run make with your platform name specified. On FreeBSD, the command is gmake instead of make. The build requires autoconf to be installed first, because Skynet uses jemalloc for memory management. A few example configurations are included so you can test a basic gate server and client right after building, by running the server and a separate client script in two terminals. Skynet uses a modified fork of Lua 5.5.0 to support multiple independent Lua states running in parallel, though you can also swap in an official Lua build by editing the Makefile. Documentation lives on the GitHub wiki, written in both English and Chinese. The FAQ is Chinese-only but can be read with a translation tool.

Copy-paste prompts

Prompt 1
I'm building an online game server with Skynet. Show me how to create two Lua services that communicate by passing messages.
Prompt 2
How do I build and run Skynet on macOS from scratch? Walk me through from cloning the repo to running the example gate server.
Prompt 3
Explain the actor model in Skynet in simple terms: how do services work and how do they avoid data conflicts when many players connect at once?
Prompt 4
I want to add a simple chat room feature to a Skynet game server. What Lua code and service setup do I need?
Open on GitHub → Explain another repo

← cloudwu on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.