游戏服务器框架pitaya

pitaya简介

最近一年在使用的一款分布式服务器框架pitaya,
https://github.com/topfreegames/pitaya
.

是由巴西的一家游戏公司开源的项目。公司的官网是:https://tfgco.com/

目前已经开发了多款游戏畅销appstore,游戏框架经过多款项目验证,

目前有一款比较火热的游戏是较zooba 中文名动物王者,这款游戏是吃鸡+moba类型的对战游戏。

框架技术选型

框架使用的技术选型还是不错的。使用etcd做服务发现,nats或者grpc作为rpc,两者都应实现可以切换选择。支持json和pb序列化。

关于网络层支持kcp.网络框架使用nano.国内开源的项目。目前使用中没有太大问题。

Go >= 1.10
etcd (used for service discovery)
nats (optional, used for sending and receiving rpc, grpc implementations can be used too if prefered)
docker (optional: used for running etcd and nats dependencies on containers)
Installing

学习资源

自己在学习的同时对源码随后做了些注释。后续会对整个框架做详细的结构性的分析。注释版本的github仓库如下。

代码会及时更新合并官方的master. 仓库如下:

https://github.com/bytemode/pitaya-notes

同时见了qq群用于技术交流,正在使用go的朋友欢迎加入交流。

QQ群:621275137

原文链接:,转发请注明来源!