I’ve been messing around with network architectures, and I have a model in mind that I think suits my needs, but I’m not sure how to implement it (or if it can be done at all). Here’s the model:
-
One dedicated server is run that communicates with all online players who aren’t currently in games
-
A player can host a lobby which will send info to the server such as the IP of the host, the number of players in the lobby, a room code and whether or not the lobby is public or can only be accessed using the room code
-
Players who aren’t in a lobby get a list of all public lobbies and their codes to display in some sort of search, they can join a lobby using this search or by entering a room code
-
(This is the part I’m unsure whether it can be done) When the host of a lobby starts the game, they host the server on their own device and the dedicated server connects all the players directly to the host server.
The intention of this model is to minimise the work that the dedicated server has to do - it shouldn’t be running instances of the game if it doesn’t have to. At the same time, I’m hoping that this can allow me to setup a direct connection between the players without having to port-forward. So my question is this, is this model feasible and will it do what I intend?
If it doesn’t bypass the need for port-forwarding, can I set up my dedicated server to simply facilitate the transport of packages between players in a server without actually processing the game data in them?