Git Product home page Git Product logo

ga_server's Introduction

ga_server

基于protoactor框架的actor游戏服务器。

设计动机

  • 一套面向actor的分布式游戏服务器
  • 实现可伸缩设计,缩可以放在一个进程,伸可以扩展多台机器均衡负载

目录结构

  • cofig:游戏协议,gameproto存放c2s/s2c协议,msgs存放s2s协议。打包将生成到src的gameproto目录
  • src/GAServer:基本库代码,主要是gate模块和service类型的封装
  • src/Robot:机器人测试代码,robotMachine是压力测试,robotTest是简单功能测试

目前数据:robotCount= 500 time=ms 5457 all_qps= 91625.44

  • src/Server:里面是各种服务的实现。服务器的具体实现目录

启动

  • win编译出server执行文件
  • 可以直接执行server,默认读取config.json配置,所有服务在一个进程
  • 或者执行StartMultiServer.bat,启多个进程服务器,服务分开部署

登录流程

红色为单点,其他都是多点。 login使用http协议和客户端沟通,其他请求通过gate转发 image

依赖

主要依赖protoactor里的库,具体参考protoactor的readme。简单的直接使用LiteIde执行go get一下就自动下载。google的几个库需要科学上网,没条件的下载我网盘里的 google库

TODO

  • battleserver实现
  • gate加密
  • ...

QQ群:285728047

ga_server's People

Contributors

magicsea 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.