Host Client vs Relay Server
Options
minotter
✭
in Photon Bolt
I'm trying to understand the key differences between BOLT's host client model vs PUN's dedicated server model. I understand that BOLT requires that one of the clients needs to act as the server. Then doesn't this also mean that the hosting machine is acting as the relay server, receiving and passing information between all other clients?
In the PUN vs BOLT doc we have:
Thanks!
In the PUN vs BOLT doc we have:
Bolt's messages must always pass through the hosting machine, even when running a game through relay and not using authoritative server logic. This adds a bit more latency to Bolt-based games.But if the BOLT master client is the relay server, then why the extra latency? I realize I must be confused about the relay server concept, can someone shed some light on it for me or point me toward pertinent docs?
PUN doesn't suffer from that caveat, as it's serialisation code sends data from a client to all the other peers through the relay by default (without having to pass through the master-client).
Thanks!
0
Comments
-
In Bolt the host doesn't just pass messages before clients, it is the complete arbiter of what gets sent to clients. You can read more about how Bolt sends data here. https://doc.photonengine.com/en-us/bolt/current/community-wiki/extra-bits/packets
The reason you want Bolt clients to connect directly to the host (punchthrough or dedicated server) is otherwise, a client sending a chat message to another client would require the following
Client -> Relay -> Server -> Relay -> Client
Obviously this introduces a lot of latency and is avoided if possible.0 -
@stanchion ok great, thank you for clarifying. I have a follow up question regarding Dedicated Server vs Listen Server. From the docs:
In Bolt however, one of the Bolt clients needs to act as a server, a true dedicated server or real host. ...the server is "static"; the "client" that starts up the game and choose to become the server, will stay as the server.
My impression was that for a given game Bolt would always use one of the existing players' machines as the server - and for instance, that client's game engine would then be used as the source of truth for authoritative movement, etc. What does it look like for a client to become the dedicated server for a game, but not to represent a participating player in that game?0 -
The player that clients connect to is referred to as the "host" or "client" in Bolt.
https://doc.photonengine.com/en-us/bolt/current/reference/glossary
This doc explains how a dedicated server is set up.
https://doc.photonengine.com/en-us/bolt/current/demos-and-tutorials/headless-server0 -
@stanchion awesome thank you! Not sure how I had missed that 2nd link before.
Can you verify that I'm understanding correctly that when a hosting client is acting as the Listen Server, that client's locally running Unity engine is in fact the deciding authority when it comes to things like authoritative movement? That is, when inputs are received from clients and there is a conflict, whatever results from that hosting client's engine simulation is the result that gets sent out to clients as ground truth.
Thanks again!0 -