Game IDs

edited February 2011 in Native
hi, I'm newbie in Photon SDK, i'm interesting:

1) if i created some game with game id "1000", so then i want to join this game with this id, from anther app, how can i get this id to join?

2) how can i get all game IDs from server?



  • 1) You mean you want to start the client / game another time and join the same game? It's easy. The game id is the handle for that. Just make each client join this room. The Realtime Demo from the client SDKs does just this. All running clients join just a single room by name / game id.

    2) There is a server logic, named Lite Lobby. This has two different room types and one of those will just list games.
    The Lite Lobby Chat Demo explains how to use that (in C#/Unity): ... bychatdemo
    We don't have this demo in C, C++ or objC yet, sorry.
  • thanks, now i'm interesting how to share concret GameID to other player in the same application, i tryed this in realtime_objc demo but fail :(
  • You have a wide area of options on how to do that. For example you can just implement on the server to code store all the gameIDs of all open games in a list and then send this list around every few seconds to all clients in a specific room, this room would be the lobby (LiteLobby already implements this for you on server side and the clients just have to join the lobby-room, so no big deal in client-logic.
    You also can let clients send gameIDs around to specific other clients by sending a custom operation with the gameID and the receiving-clients to the server. You would have to implement that operation on the server side in this case by letting it look up, if the receivers are online and them sending them an event with that gameID.

    You mean, you are interested in something, if you want to know more about it. You are interesting would mean, that others would want to know more about you and normally others would say that about you, but not you about yourself.
Sign In or Register to comment.