pitaya

command module
v3.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 1 Imported by: 0

README

pitaya Build Status Coverage Status GoDoc Docs Go Report Card MIT licensed


Pitaya 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. It provides a basic development framework for distributed multiplayer games and server-side applications.

Getting Started

Prerequisites
  • Go >= 1.16
  • etcd (optional, used for service discovery)
  • nats (optional, used for sending and receiving rpc)
  • docker (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.

$ 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

Acknowledgements

  • nano authors for building the framework pitaya is based on.
  • pomelo authors for the inspiration on the distributed design and protocol

Security

If you have found a security vulnerability, please email security@tfgco.com

Resources

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
examples
pkg
agent/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
cluster/mocks
Package mock_cluster is a generated GoMock package.
Package mock_cluster is a generated GoMock package.
conn/codec/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
conn/message/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
interfaces/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
metrics/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
networkentity/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
protos/mocks
Package mock_protos is a generated GoMock package.
Package mock_protos is a generated GoMock package.
serialize/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
session/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
worker/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL