Moon is a lightweight online game server framework implement with actor model. One thread may have 1-N service(luaVM), they use message queue for communication. There are many features for game server development:
- Less core code, easy to learn
- Cross-platform (Windows, Linux, MacOS)
- Optimized networking
- Tcp
- Udp/Kcp
- Websockets
- Http
- Lua coroutine based asynchronous
- Coroutine-socket
- Timer
- Service-to-service communication
- Interprocess(cluster) 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
https://github.com/sniper00/moon/wiki
# Run test
./moon 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
-
Make sure your compiler(msvc2019, gcc 9.3+, clang 9.0+) support for C++17 or Install
C++17
Compiler.。 -
Clone source code
git clone --recursive https://github.com/sniper00/moon.git
-
Build
- windows run
build.bat
- linux:
make config=release
- maxos: See detail build steps
- windows run
-
If you want modify premake5 script, See detail build steps