Skip to content
/ moon Public
forked from sniper00/moon

A lightweight game server framework implemented with Actor Model

License

Notifications You must be signed in to change notification settings

zhengjc6/moon

 
 

Repository files navigation

Current building status

linux-gcc

linux-clang

macos-clang

windows-vs2022

Demo

Moon

Moon is a lightweight online game server framework implement with actor model. One thread may have 1-N luaVM, they use message queue communication. There are many features for game server development:

  • Less core code, easy to learn
  • Cross-platform (Windows, Linux, MacOS)
  • Optimized networking
    • tcp
    • websockets
    • http
  • Lua coroutine based asynchronous
    • coroutine-socket
    • timer
    • inter luaVM communication
    • inter cluster(process) communication
    • redis/mysql/pgsql/mongodb async driver
  • High performance and optimized Lua Json library
  • Lua protobuf library
  • Lua filesystem
  • Recast Navigation

OverView

Framework

image

Community

  • Gitter

  • QQ group: 543833695

Documents

https://github.com/sniper00/moon/wiki

Dependencies

Quick Start

Download Pre-Built Binaries

https://github.com/sniper00/moon/releases

# run echo server
./moon example/helloworld.lua
# another terminal run client(coroutine socket writed)
./moon example/helloworld_client.lua
# input any string

Manual Build

  1. Make sure your compiler(msvc2019, gcc 9.3+, clang 9.0+) support for C++17 or Install C++17 Compiler.

  2. Moon uses premake5 to build platform specific projects. Download it and make sure it's available on your path.

  3. Clone source code

    git clone https://github.com/sniper00/moon.git
  1. If want link mimalloc, edit premake5.lua local MOON_ENABLE_MIMALLOC = true

  2. Build

    • windows run build.bat
    • linux:
          chmod +x build.sh
          chmod +x premake5
          ./build.sh
    • macosx:
          ./premake5 gmake --cc=clang
          make clean config=release
          make config=release

    If failed,See detail steps

Friend Open Source

About

A lightweight game server framework implemented with Actor Model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 78.5%
  • C 18.2%
  • Lua 3.3%
  • CMake 0.0%
  • HTML 0.0%
  • Batchfile 0.0%