And once again

This commit is contained in:
2025-02-18 13:30:48 +01:00
parent 37154955d6
commit 16b06ba642
77 changed files with 581 additions and 199 deletions

18
docs/docs/game_root.md Normal file
View File

@ -0,0 +1,18 @@
# EntryPoint
The `EntryPoint` is kind of second root in the `Tree`. We're using it to structure all the game components and impleent the game loading logic
Structure:
```
EntryPoint
├── LevelPlacehoder
└── MainMenu
```
`EntryPoint` should also be aware of the launch mode. The game can be started in two modes:
- Default game mode
- Dedicated server mode
Depending on the mode, `EntryPoint` should be able to either read the config and run the dedicated server, or run the game

View File

@ -0,0 +1,15 @@
# Multiplayer Design
The server is responsible of holding all the information about all the players. Once the server is loaded it should have a current map set as one of the properties that will be sent to all the connected clients. We are not using the Godot built-in Multiplayer objects as they seem to be uncapable of handling big scenes and we need to implement our own logic for handling player movement anyway, so the built-in objects will be only interfering and we will have to find workarounds.
# Level loading
Once the server is created, it's waiting for the requests from the clients. It's aware of the map that is laoded and also should be aware of the checksum of the loaded map to make it possible to verify the map on the client side.
When a client is connected it should be added to the `Dictionary` that holds the data about all the players. and also it should receive the copy of the current server data, so its instance can load the desired map and place other players there.
Each client should have 'its' node on the server that would represent client's position, rotation, velocity, etc. Only the server should be able to modify it's properties, and hence clients must send the data in order to make server aware of their descisions.
Each client should have a node that would reflect its server node. It should listen to the inputs and send the input data to the server in order to make the server node instance move. Once it's moved on the server, server will send it's new position/transfotm/... to the client via RPC, so all the clients are in sync.
Every player mode but the client's one should end up in the model that is representing the player's model. It should exist in the client's local space, since theses nodes should move smoothly, we need to process the logic on the client's side. From time to time we need to sync its position to the corresponding `ServerNode`, that same applies to the `PlayerNode`