Skip to content

Commit

Permalink
Client connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Makkkkus committed Dec 19, 2023
1 parent e42fd11 commit b191f0b
Show file tree
Hide file tree
Showing 2 changed files with 216 additions and 1 deletion.
8 changes: 7 additions & 1 deletion documentation/client-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Client architecture overview
---

[The client](https://github.com/OpenHellion/Server) is the part of the project that the players interact with. It contains all of the graphical assets, handles rendering, and serves as an interface to the player.
[The client](https://github.com/OpenHellion/Server) is the part of the project that most players interact with. It contains all of the graphical assets, handles rendering, and serves as an interface to the player.

As the diagram below shows, intialisation is handled by the InitialisingScene, which when has completed, sends the player over to the Main Menu Scnene. This scene then sends the player to the Client scene.

Expand All @@ -13,3 +13,9 @@ NB: The diagram shows as the game should be, and therefore does not reflect the
The client scene starts by initialising all of the dependencies it needs to start a game. It then follows on by getting the match it wants from the NakamaManager, and then joins that match to get connectionin

In addition to this, there also exists many scenes for the various structures and celestial objects in the game. These are loaded and cached on initialisation and fetched when they are to be used in the game.

## Joining the server
Joining the server is a pretty straightforward process. It starts with logging in with Nakama, then fetching a server to join, which starts a class called GameStarter. Following this, the client connects to the server using Telepathy, which sends out an event when completed. When this event is called, a LogInRequest is sent, and if successful, we should be connected.

After this a bunch of data is exchanged to load the world and etc. The diagram below should bring some insight into the workings of the process.
![A diagram of the joining process.](res/ClientConnection.drawio.svg)
209 changes: 209 additions & 0 deletions documentation/res/ClientConnection.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b191f0b

Please sign in to comment.