Bestia Client
The Bestia Client is build with the awesome Godot Open Source engine. Its job is the visualization of the game world. It synchronizes with the game server and will display entities so the player is able to interact with them.
It also transmits the voxel model of the world and visualizes the game map with the help of the Godot Voxel plugin as well as a custom module for the entity management.
Getting Started
As mentioned you will most likely need to build your own custom build of the Godot engine to include the
Godot Voxel plugin as well as the custom module bestia-entity
for entity managment.
Warning: Its currently unclear how to structure the repositories. It might be that a mono-repo makes sense.
- Checkout the official Godot sources:
git clone https://github.com/godotengine/godot.git
- Checkout the Voxel plugin:
cd godot/modules git submodule add https://github.com/Zylann/godot_voxel.git voxel
- TBD
Then build the engine for your target platform. In order to do so, consult the official build documentation.
Architecture
The server is build with a Entity Component System in mind. The logic of the server makes sure all the component updates of entities relevant for the client are send over the network.
There are some notable classes in the bestia-entity
module:
- EntityManager
- Reserves local IDs, if entities are created via the editor
- Keeps track of entities and their components
- Updates components and signal changes to the engine
- If an entity is deleted it gets informed and removes it from the tree
- ComponentSetter
- Enables component value access via the editor
- On start it creates a protobuf message from exports and notifies the EntityManager