sbischoff-ai / pygase

A Python package that contains a high-performance, versatile UDP-based game server, client and network protocol with a simple API.
MIT License
43 stars 7 forks source link

Integration with Game Engines #7

Open Zenahr opened 3 years ago

Zenahr commented 3 years ago

Can this be used as a backbone for an MMO built using Unity3D or Unreal Engine?

sbischoff-ai commented 3 years ago

Better late than never: It can be, in principle, but it would require a client implementation of the pygase protocol for C# (Unity3D) or C++ (Unreal 4). This repository only contains the client implementation for Python. I had the intention of developing a JavaScript, C# and C++ client for pygase at some point but didn't have the time yet.

As it is, given the content of this repository, pygase is a Python-to-Python technology.

Concerning the MMO part: The core requirement for an MMO would be optimizations that allow for horizontal scaling, so you would want to have several GameStateMachines that simulate different "zones" or independent sub-states of the overall game state in parallel. You would also want to divide players/clients into groups that can be served and simulated independently. This is some higher level architecture I have not yet incorporated into pygase, although I do have some ideas for it. Basically, I have the idea to provide a logical structure for zoning and a template for containerized pygase backend components (where servers and game state machines are separate kinds of docker containers and the game state store runs on redis) that can be used with orchestration technologies, such as Kubernetes.

The background behind this project is exactly that I wanted a viable networking technology for backends of MMO-like games in Python. I'm working full-time on non-game related stuff though, which leads to this project lying dormant for countless months for example.

TL;DR: Only with a lot of work. Feel free to fork though.

Zenahr commented 3 years ago

Noted! The "zoning" logic might even be an implementation detail on the game side of things by the sound if it.