New to Photon Questions for Unity and LiteLobby.

Options
crzyone9584
edited March 2011 in DotNet
I ws looking at the code for the LiteLobby demo for unity. I was wondering if it was possible to have default rooms made. I didnt see anything mentioned in the comments of the code. But I'm creating a game where people will meet in a main lobby and create rooms which will load the game level and they can play in there. I was wondering if it was possible to have it set up with after the user joins the chat they get thrown into a pre made lobby then are able to create a room which will load information for their game which will hold up to 4 people to a room.

Comments

  • Tobias
    Options
    It's possible to have default rooms, of course but I usually think it's not necessary: In our Lite Application you can create any room on the fly, just using the client side. It does not matter if the room is defined before you use it. Make a client enter a room and there it is...

    You want a lobby? Make players join the room "lobby". Everyone in the lobby will meet there.
    You want to make 4 players get into another room? Make the clients check how many players are in the lobby and the first 4 of those (identified by ascending actorNr) can join a new room. You would need a unique name here, so the 4 players join the same one. Of the 4 players, the one with the lowest actornumber can generate a GUID and send it, e.g.

    Otherwise, you can add matchmaking to the server side, of course. The concept will be similar. You could modify the handling for Operation Join: when someone joins a lobby, you can count the current users and if there are 4, send an event "match made" to your clients with a new room-name. Then the clients join this room. Or you could move them directly to the new room.
  • I'm not very good with networking/server/client. I'd like a lobby rather than matchmaking and have user make rooms which will be listed with the amount of players in a list. Although this may be out of my league. Although without trying there is no way to know for sure. Thanks for the info. I guess its time to figure out how to make it so people join one single room.
  • Tobias
    Options
    If your lobby should be the meeting point for everyone, then yes, make everyone join that single room. Give it the name "mylobby" or something and set a state on the client for being "inlobby". Let everyone meet there and join games.
    You can send events in any room, so aside from sending the actual positions and actions in a match, you can use raise event in the lobby to send chat messages or invitations. Use actor properties to make each player's name known.

    The Chat Demo would be a starting point. Just don't use the "Lite Lobby" functionality. Use regular rooms only.
    http://developer.exitgames.com/liteandl ... bychatdemo