Coder Social home page Coder Social logo

liujiang-bit / go-pomelo-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dfklegend/cell

0.0 0.0 0.0 100.06 MB

golang pomelo rpc go game server unity framework

License: Apache License 2.0

JavaScript 6.23% Go 70.42% C# 22.60% HTML 0.72% Batchfile 0.04%

go-pomelo-client's Introduction

整体目标

使用go搭建服务器,希望满足以下需求
. 架构参考pomelo
. 能方便的切分服务器功能,组织子服务器
. 易于使用的服务器rpc
. 服务发现
. 与逻辑开发无关
. web控制台
. 进程热替换机制

go语言相关
. 定义逻辑的routine调度原则
. 提供对应的支持库

整体进展

框架部分

. RPC基础功能
	gRPC或者TCP协议
	Json格式
. 服务器框架功能
	自由定制服务器组件
. 前端协议路由转发
. 前端同时允许TCP和WS接入
. 基于ETCD的服务发现
. 整理了调度器机制,可以方便的将
  任务推送到指定调度器执行
. 整理了通用的Timer机制
	携程和调度器驱动
. 整理了通用的Event机制
	调度器内部事件
	全局事件

实践部分

. 聊天室和roll点功能
. 尝试搭建MMO结构,进行一些测试

TODO

. 更好的性能分析
. 进一步搭建模拟MMO工程,验证合适的模型

server/examples

需要安装etcd
https://github.com/etcd-io/etcd/releases
https://github.com/etcd-io/etcd/releases/download/v3.4.19/etcd-v3.4.19-windows-amd64.zip

chat

功能

可以通过浏览器启动chat-client/index.html来启动客户端
客户端启动后,登录服务器,随机分配到某个聊天服务器
并加入房间,房间最多3人,可以聊天
聊天输入/roll可以掷骰子
玩家进入服务器总是进入最前面的房间
房间不会删除

配置与启动

data/config/servers.yaml
配置了多个服务器
使用id来启动不同的服务器类型
./chat.exe -id=gate-1
./chat.exe -id=chat-1

最少需要包含一个gate和一个chat组件

客户端

chat-client
网页客户端 index.html拖拽到浏览器执行

chat-client-go
go 客户端

refs

https://github.com/topfreegames/pitaya https://github.com/lonng/nano

go-pomelo-client's People

Contributors

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