Giter Club home page Giter Club logo

moon's Introduction

Moon

一个轻量级的游戏服务器框架,底层采用C++17编写,逻辑层采用Lua脚本。

主要特性有

  • async lua协程封装异步操作,取代传统的回调模式。

  • timer 轮式定时器的实现,配合lua协程,更加方便处理定时任务。

  • coroutine socket 协程socket的封装,方便编写自定义协议的网络模块。

  • async redis client 协程socket封装的redis DB异步客户端。

  • websocket 支持websocket协议(暂时只支持作为服务端)。

  • cluster 提供集群间通信(暂时通过统一的配置文件作为服务发现,不支持动态增删)。

  • extensible 利用sol2库可以方便编写C/C++lua交互的扩展模块。

Dependencies

Bulid

The project use of C++17 features, I tested compliers are:

  • GCC 7.2
  • Visual Studio 2017 Community Update 5
  • clang version 7.0.1 (MacOSX)

不同平台安装支持C++17的编译器

需要使用premake生成工程文件, 下载最新的premake5

git clone https://github.com/sniper00/moon.git 获取源码

把下载好的premake可执行文件复制到premake5.lua同级目录。

  1. Windows Platform:
    premake5.exe vs2017
  1. Linux Platform:
  • 生成Makefile,编译器可选clang:
    ./premake5 gmake [--cc=clang]
  • 编译,默认Debug版,可选指定Release版:
    make clean [config=release]
    make [config=release]
  • 运行示例:
    cd example
    ./moon -r 1
  1. MacOSX Platform: 只支持使用clang编译
    ./premake5 gmake --cc=clang

QQ交流群543833695

moon's People

Contributors

sniper00 avatar wanghenshui avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.