Bolt client information
Options
in Photon Bolt
Hi,
I am not sure if I missed any documentation, but I couldn't find a good way to recognize an user when they join a game. (I could not find a good example for lobby or match making as well, I saw Zeuz was deprecated.) It seems you shift to Photon cloud for headless server option and this is what I am working towards to.
What I want to do is like to assign some user to seat 1 (or player at position 1), so that if he drops connection and comes back, he can be assigned back to seat 1 based on his information and pick up the game from there. I am not sure when and how to pass client information (like a userId) to server, and how to let the client session know that he is being assigned to a seat.
Right now, I can only get a connection Id when someone joined the server, however, I don't know how to figure out the connection id of a client as the client itself.
Btw, the seating matters because I want the clients only accept server events sending to that seat but not to everyone, like sending some secret message to a seat and I only want that seat to keep/display this record. I am not sure if I can achieve this in a different way.
Thanks
I am not sure if I missed any documentation, but I couldn't find a good way to recognize an user when they join a game. (I could not find a good example for lobby or match making as well, I saw Zeuz was deprecated.) It seems you shift to Photon cloud for headless server option and this is what I am working towards to.
What I want to do is like to assign some user to seat 1 (or player at position 1), so that if he drops connection and comes back, he can be assigned back to seat 1 based on his information and pick up the game from there. I am not sure when and how to pass client information (like a userId) to server, and how to let the client session know that he is being assigned to a seat.
Right now, I can only get a connection Id when someone joined the server, however, I don't know how to figure out the connection id of a client as the client itself.
Btw, the seating matters because I want the clients only accept server events sending to that seat but not to everyone, like sending some secret message to a seat and I only want that seat to keep/display this record. I am not sure if I can achieve this in a different way.
Thanks
0
Comments
-
Zeus is Bolt's original Master Server, which no longer exists, Zeuz is something else entirely.
When you connect to a server, you can include a token so the server has a way to identify you. See Player.cs from the samples for an example of player management.
Once a client connects, it can get its own connectionID like this.
https://doc-api.photonengine.com/en/bolt/current/class_bolt_connection.html#a5d4d01655021d9a05ad7937df6b04658
0 -
@stanchion Thanks for your answer!0