Mystic is an MMO game framework for Godot 4+.
In order to work on Mystic and iterate quickly, you will need to have these components running locally:
Running these manually can be a huge hassle, especially having to restart the game servers everytime you modify something, debugging is also an issue as you will need a centralized way to see all the servers logs.
In order to solve these issues, Mystic will create a local Kubernetes cluster with support of hot-reload of the servers using Tilt. Each changes related to the server will trigger a rebuild and restart, you'll just have to wait for completion before starting the client.
The following sections will first walk you through the Godot setup (engine version and addons using GodotEnv) and then you'll setup the Kubernetes cluster, API (Not yet implemented) and gameservers in a single command.
Before working on a Mystic project, you'll need to install the following tools:
make godot
to setup your Godot version and addons using Godotenvmake dns
, to add monitoring.mystic.local
to your host filemake cluster
to setup the Kubernetes cluster and have the monitoring tools deployedtilt up
and press space while the process is running to open the web ui (or goOnce the setup steps are completed, you are now ready to work on your game. This section will describe how to work with Mystic as your framework and give some examples to implement some features (TODO!)
TODO: Add godot side of things once done, also add documentation links
The end goal is to have a custom protocol file format to easily generate the packets, for now everything is registered manually in your code.
Each packets are registered automatically when subscribed / sent, you only need to register it's nested types if they aren't on of these types :
byte sbyte short ushort int uint long ulong float double bool string char IPEndPoint
To do so, use Client.RegisterNestedType<YourTypeHere>()
in the client and Server.RegisterNestedType<YourTypeHere>()
in
in the server BEFORE using your packet (otherwise all it's fields will be uninitialized).
Example :
// Server
Server.RegisterNestedType<PlayerInput>();
Server.Subscribe<PlayerInputPacket>(HandlePlayerInput);
// Client
Client.RegisterNestedType<PlayerInput>();
Client.Send(new PlayerInput(), DeliveryMethod.Unreliable);
To explore your servers logs, go here To see your servers metrics (RAM/CPU usage, packets/s, bytes sent/s, etc.) go here