Hello, I am a beginner to multiplayer games in a whole and had a question about the architecture of a dedicated server multiplayer approach. At first, I assumed that server code would be running on one of the players devices , the “host,” but when watching this video https://www.youtube.com/watch?v=nyKBuM9Y_-Q the suggestion was to have whatever server your running run Godot as well as act as the dedicated server. My question, is how does that work for when actually publishing a game? I understand(as shown in the video) that you can locally run a dedicated server with Godot code for testing, but how does a server on the cloud run code on Godot? If this is confusing please let me know so I can elaborate, thank you!
Understanding the developer perspective for Godot dedicated servers: https://www.youtube.com/watch?v=m2-eEztV6VA (there’s probably better vids, but this is the one I found that seemed to cover the whole process).
Thank you! Both of the videos actually provided a lot of insight. I just wanted to clarify these two videos show two DIFFERENT approaches for using dedicated server, and not something that are combined to run multiplayer games right?
I guess they sort of do, in that in one case a player is setting up a dedicated server and in the other the developer is.
I define dedicated server multiplayer as a separate executable for the game server–that is, there is a game client .exe and a game server .exe. The game clients communicate with the server over a network and it really doesn’t matter where the server.exe is running–except for connectivity and latency.
One of the players can host a dedicated server (that’s the first video). It can even be hosted on the same machine their game client is running on (unless some technical limitation prevents it), but that’s sort of unrelated to “dedicated server mulitplayer.”
The 2nd video shows the developer creating a cloud instance to host the dedicated server.
In contrast, peer multiplayer doesn’t use a separate server-only executable–one of the game.exe’s acts the host (multiplayer authority) and the others act as clients. Although, it might look similar to one player hosting a dedicated server on the same machine they play on.
For this, I have a different question. One, when you say the player acts as the host, that means that one of the players machines will determine what happens to all clients correct? Two, since peer-peer does not use a server executable does that mean that all people who want to connect over a network would need to configure something additionally to play? If my questions are confusing I apologize
Home routers usually allow all outgoing connections. Yes, one game (called the host) is the “authoritative server” and their game decides what happens for all the connected client. Only the host player might need special router config to allow incoming connections. That is discussed in the first video I linked, when he’s talking about “port forwarding.”
So with a peer-peer network configuration one player, “the host” would need special configuration. However, with a dedicated server the developer sets up there would be nothing the player would need to configure?