Need help with moon?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

sniper00
318 Stars 88 Forks MIT License 773 Commits 0 Opened issues

Description

A cross-platform,lightweight,scalable game server framework written in C++, and support Lua Script

Services available

!
?

Need anything else?

Contributors list

# 108,442
cpp17
Unity
gameser...
Ada
616 commits
# 234,809
C++
Redis
rocksdb
nosql-d...
1 commit

Current building status

linux-gcc

linux-clang

macos-clang

windows-vs2019

Moon Game Framework

moon 是一个轻量级的游戏服务器框架,底层采用C++编写,逻辑层主要采用Lua。框架使用多线程和多LuaVM(lua service)的模式, 把不同的游戏服务器模块(通常是一个进程),尽量集中到一个进程中,简化开发和维护难度。一个lua service可以表示一个游戏服务器模块,它们之间通过消息队列互相通信(大部分相情况下只是传递一个数据指针),通常比进程间IO通信高效,也不需要维护复杂的网络链接。 Lua的协程特性,也使异步逻辑的编写更加简单。

框架本身没有提供太多的游戏业务层逻辑,主要目标是提供基础功能。

如果有疑问或者建议欢迎提交issue,或者加入QQ群 QQ交流群: 543833695

依赖

快速开始

  1. 框架基于

    C++17
    编写,需要安装相应的编译器,不同平台安装支持C++17的编译器
  2. 获取源码

    git clone https://github.com/sniper00/moon.git
    
  3. 编译

    • windows 双击运行
      build.bat
    • linux:
      shell
          # 添加可执行权限
          chmod +x build.sh
          chmod +x premake5
          ./build.sh
      

    如果失败,参考详细编译步骤

  4. 运行

# 运行 echo server
./moon -f example/helloworld.lua
# 另启动一个终端运行 client(协程socket编写的客户端)
./moon -f example/helloworld_client.lua
# 输入任意字符

游戏示例

  • 简单示例Demo(BallGame): https://github.com/sniper00/BallGame.git

Friend Open Source

NoahGameFrame
- Author: ketoo
- GitHub: https://github.com/ketoo/NoahGameFrame
- Description: A fast, scalable, distributed game server framework for C++, include actor library, network library,can be used as a real time multiplayer game engine ( MMO RPG ), which plan to support C#/Python/Lua script, and support Unity3d, Cocos2dx, FlashAir client access.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.