# moon **Repository Path**: supermoons/moon ## Basic Information - **Project Name**: moon - **Description**: A cross-platform,lightweight,scalable game server framework written in C++, and suport Lua Script - **Primary Language**: C++ - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 2 - **Created**: 2019-10-11 - **Last Updated**: 2025-11-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: Cpp, Lua, gameserver, game, Actor ## README # Current building status [![linux-gcc](https://github.com/sniper00/moon/actions/workflows/linux-gcc.yml/badge.svg)](https://github.com/sniper00/moon/actions/workflows/linux-gcc.yml) [![linux-clang](https://github.com/sniper00/moon/actions/workflows/linux-clang.yml/badge.svg)](https://github.com/sniper00/moon/actions/workflows/linux-clang.yml) [![macos-clang](https://github.com/sniper00/moon/actions/workflows/macos-clang.yml/badge.svg)](https://github.com/sniper00/moon/actions/workflows/macos-clang.yml) [![windows-vs2022](https://github.com/sniper00/moon/actions/workflows/windows-vs2022.yml/badge.svg)](https://github.com/sniper00/moon/actions/workflows/windows-vs2022.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=sniper00_moon&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=sniper00_moon) # Moon Moon is a lightweight game server framework based on the actor model. One worker thread can have one or more actors (services), which communicate with each other through message queues. There are many features for game server development: - The architecture is simple, and the source code is concise and easy to understand. - Cross-platform (Windows, Linux, MacOS) - Uses ASIO for scheduling - Uses Lua for logic scripting - Optimized networking - Tcp - Udp/Kcp - Websockets - Http - Asynchronous based on Lua coroutines - Coroutine-socket - Timer - Inter-service communication - Inter-process communication - Redis/PostgreSQL/Mongodb/Mysql async client driver - High performance and optimized Lua Json library - Lua protobuf library - Lua filesystem - Recast Navigation - Lua zset library for ranklist > Want more extension libraries? See > https://github.com/sniper00/lrust # OverView ## Framework ![image](https://github.com/sniper00/moon/raw/master/src/image/01.png) # Community - [![Gitter](https://badges.gitter.im/undefined/community.svg)](https://gitter.im/undefined/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - QQ group: 543833695 # Documents [Doc](https://github.com/sniper00/moon/wiki) # Quick Start [Download Pre-Built Binaries](https://github.com/sniper00/moon/releases/tag/prebuilt) ```shell # Run test ./moon example/test/main_test.lua # Run script in the example directory, e: ./moon example/example_timer.lua # This is a guessing game, example/GuessGame.md ./moon example/main_game.lua ``` # Demo - [MoonDemo](https://github.com/sniper00/MoonDemo.git) # Build 1. Make sure your compiler(vs2022 17.5+, gcc 9.3+, clang 9.0+) support C++17 or [Install `C++17` Compiler.](https://github.com/sniper00/moon/wiki/Build#%E5%AE%89%E8%A3%85c17%E7%BC%96%E8%AF%91%E5%99%A8)。 2. Install **premake5** and ensure that the **premake5** executable location is included in your system path. > Download link: https://premake.github.io/download > On Mac, you can install it using `brew install premake` 3. Clone source code ```shell git clone https://github.com/sniper00/moon.git # Add extension library: premake5 add --package= # premake5 add --package=https://github.com/sniper00/lrust.git ``` 4. Build ```shell cd moon premake5 build --release ``` 5. Run ```shell premake5 run --release example/send_benchmark.lua ``` 6. Publish ```shell premake5 publish ``` # Use case ### If your project uses moon, feel free to contact the author. The author is happy to showcase your work.. | g1 | g2| | ------------------------------------------------------------ | ------------------------------------------------------------ | |

[Age of kita](https://www.taptap.cn/app/225455)

|

[战神遗迹](https://www.taptap.cn/app/194605)

| # Friend Open Source - [NoahGameFrame](https://github.com/ketoo/NoahGameFrame)