Rooms questoin

Options
kfrench16
edited February 2011 in Photon Server
I've been going through the code; I had a question regarding rooms.

Do the individual rooms reside on the server for people to connect to? If so, I can't seem to find where rooms are created. I have found, on the client side, what appears to be room creation . For example,

(I forget which file I saw this in exactly) GetRandomRoomName() was used to generate a GUID for a new room name. Based on that, it appears as though the client is creating the room. Is this correct?

I looked all through the server code of the LiteLobby demo for room creation. I did not find anything which has left be a bit confused. I would think the various rooms would be generated server side. Unless my understanding of rooms is, well, wrong.

Thanks for any insight on this.

Comments

  • Boris
    Options
    Rooms have a unique name and are created on the server side when the first player joins (and destroyed when the last player leaves).
    To understand where/how follow the code path of OperationRequestDispatcher.HandleJoinOperation to RoomCacheBase.GetRoomReference and eventually to LiteGameCache.CreateRoom.
  • Thanks for the quick response. That does clarify things now. It looks like I was seeing things correctly after all.

    My thinking is going one way not the photon way which is causing me some grief :)