Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/topfreegames/pitaya
Scalable game server framework with clustering support and client libraries for iOS, Android, Unity and others through the C SDK.
https://github.com/topfreegames/pitaya
android game game-framework game-server golang-application ios
Last synced: about 2 months ago
JSON representation
Scalable game server framework with clustering support and client libraries for iOS, Android, Unity and others through the C SDK.
- Host: GitHub
- URL: https://github.com/topfreegames/pitaya
- Owner: topfreegames
- License: mit
- Created: 2018-03-19T19:40:36.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-08-19T16:29:46.000Z (4 months ago)
- Last Synced: 2024-09-05T10:51:44.866Z (3 months ago)
- Topics: android, game, game-framework, game-server, golang-application, ios
- Language: Go
- Homepage:
- Size: 6.32 MB
- Stars: 2,297
- Watchers: 92
- Forks: 471
- Open Issues: 54
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - Pitaya - Scalable game server framework with clustering support and client libraries for iOS, Android, Unity and others through the C SDK. (Game Development / Search and Analytic Databases)
- awesome-go - Pitaya - Scalable game server framework with clustering support and client libraries for iOS, Android, Unity and others through the C SDK. Stars:`2.4K`. (Game Development / Search and Analytic Databases)
- awesome-made-by-brazilians - Pitaya
- awesome-go - pitaya - Scalable game server framework with clustering support and client libraries for iOS, Android, Unity and others through the C SDK. - ★ 78 (Game Development)
- awesome-go-extra - pitaya - 03-19T19:40:36Z|2022-08-15T21:37:49Z| (Game Development / Advanced Console UIs)
README
# pitaya [![Build Status][7]][8] [![Coverage Status][9]][10] [![GoDoc][1]][2] [![Docs][11]][12] [![Go Report Card][3]][4] [![MIT licensed][5]][6]
---
[1]: https://godoc.org/github.com/topfreegames/pitaya?status.svg
[2]: https://godoc.org/github.com/topfreegames/pitaya
[3]: https://goreportcard.com/badge/github.com/topfreegames/pitaya
[4]: https://goreportcard.com/report/github.com/topfreegames/pitaya
[5]: https://img.shields.io/badge/license-MIT-blue.svg
[6]: LICENSE
[7]: https://github.com/topfreegames/pitaya/actions/workflows/tests.yaml/badge.svg
[8]: https://github.com/topfreegames/pitaya/actions/workflows/tests.yaml
[9]: https://coveralls.io/repos/github/topfreegames/pitaya/badge.svg?branch=master
[10]: https://coveralls.io/github/topfreegames/pitaya?branch=master
[11]: https://readthedocs.org/projects/pitaya/badge/?version=latest
[12]: https://pitaya.readthedocs.io/en/latest/?badge=latestPitaya is an simple, fast and lightweight game server framework with clustering support and client libraries for iOS, Android, Unity and others through the [C SDK](https://github.com/topfreegames/libpitaya).
It provides a basic development framework for distributed multiplayer games and server-side applications.## Getting Started
### Prerequisites
* [Go](https://golang.org/) >= 1.16
* [etcd](https://github.com/coreos/etcd) (optional, used for service discovery)
* [nats](https://github.com/nats-io/nats.go) (optional, used for sending and receiving rpc)
* [docker](https://www.docker.com) (optional, used for running etcd and nats dependencies on containers)### Installing
clone the repo
```
git clone https://github.com/topfreegames/pitaya.git
```
setup pitaya dependencies
```
make setup
```### Hacking pitaya
Here's one example of running Pitaya:
Start etcd (This command requires docker-compose and will run an etcd container locally. An etcd may be run without docker if preferred.)
```
cd ./examples/testing && docker compose up -d etcd
```
run the connector frontend server from cluster_grpc example
```
make run-cluster-grpc-example-connector
```
run the room backend server from the cluster_grpc example
```
make run-cluster-grpc-example-room
```Now there should be 2 pitaya servers running, a frontend connector and a backend room. To send requests, use a REPL client for pitaya [pitaya-cli](https://github.com/topfreegames/pitaya/tree/main/pitaya-cli).
```
$ pitaya-cli
Pitaya REPL Client
>>> connect localhost:3250
connected!
>>> request room.room.entry
>>> sv-> {"code":0,"result":"ok"}
```## Running the tests
```
make test
```
This command will run both unit and e2e tests.## Contributing
#TODO## Authors
* **TFG Co** - Initial work## License
[MIT License](./LICENSE)## Acknowledgements
* [nano](https://github.com/lonnng/nano) authors for building the framework pitaya is based on.
* [pomelo](https://github.com/NetEase/pomelo) authors for the inspiration on the distributed design and protocol## Security
If you have found a security vulnerability, please email [email protected]## Resources
- Other pitaya-related projects
+ [libpitaya-cluster](https://github.com/topfreegames/libpitaya-cluster)
+ [libpitaya](https://github.com/topfreegames/libpitaya)
+ [pitaya-admin](https://github.com/topfreegames/pitaya-admin)
+ [pitaya-bot](https://github.com/topfreegames/pitaya-bot)
+ [pitaya-cli](https://github.com/topfreegames/pitaya/tree/main/pitaya-cli)
+ [pitaya-protos](https://github.com/topfreegames/pitaya-protos)- Documents
+ [API Reference](https://godoc.org/github.com/topfreegames/pitaya)
+ [In-depth documentation](https://pitaya.readthedocs.io/en/latest/)- Demo
+ [Implement a chat room in ~100 lines with pitaya and WebSocket](./examples/demo/chat) (adapted from [nano](https://github.com/lonnng/nano)'s example)
+ [Pitaya cluster mode example](./examples/demo/cluster)
+ [Pitaya cluster mode with protobuf protocol example](./examples/demo/cluster_protobuf)