PlayerProperties, RoomProperties.. Lobby and in room

Options
carmine
carmine ✭✭
A couple of questions about PlayerProperties and RoomProperties.

I'm using RoomProperties now so that (from the lobby) I can store a couple of strings and things. I'm not using PlayerProperties at all.

Questions
- I remember setting which room properties get sent back to the lobby. Is there anyway for it to just send ALL room properties back to the lobby (without choosing them?)

- Can only the master update room properties, or can everyone?

- When I set a player property... does this get propagated to everyone everywhere? Or just to people in the same room as you?

- Is there anyway to get a list of the players that are in the room from the Lobby when I do a room list? Currently, I made up a room property called "playerList" and I keep updating it, but it can get confused sometime.

Thanks!

-Carmine

Comments

  • Tobias
    Options
    > I remember setting which room properties get sent back to the lobby. Is there anyway for it to just send ALL room properties back to the lobby (without choosing them?)
    No, you can't. We don't encourage that either. Once you get successful and have a lot of games, this will spam your clients to the point of breaking (because we don't do paging for room lists so far). This happens earlier the more properties you send along.

    > Can only the master update room properties, or can everyone?
    Everyone can.

    > When I set a player property... does this get propagated to everyone everywhere? Or just to people in the same room as you?
    Only in the same room as you. They are per user but stick to the room.

    > Is there anyway to get a list of the players that are in the room from the Lobby when I do a room list? Currently, I made up a room property called "playerList" and I keep updating it, but it can get confused sometime.
    No. And we don't encourage that either ;)
    You can FindFriends if you are looking for the games of players you know. This gives you a list of values that are actually of interest for your client instead of giving you "all" and make the client filter.

    Some of these features might seem limited but in the end, we have to make sure we make the most out of the bandwidth we have. Having more info is always interesting but when things become busy, the same "interesting" info becomes spam rapidly. As user, you can't browse a 1000 room listing in a meaningful way. If you just look for a game with a specific play type, map, etc, you could better use random matchmaking and get a proper answer in no time (and saving the bandwidth for other stuff).
  • carmine
    Options
    For instance... I have a space game, people love to name themself, "Kirk", "Spock" and "Picard"

    However, this can cause players with the same name to enter a room. If there was a way I could check if someone had that name in the room BEFORE joining it would be great.
  • Tobias
    Options
    That's an interesting use case. I wonder why I didn't pick "Kirk" in our own forum :)
    FindFriends is no help in this case. It only works properly if a user has a unique userId. If everyone is "Kirk", only the last room any Kirk entered will be found. You still don't know if there's a Kirk in the room you are about to join.

    If you don't want to create a complete account system with unique names (so "Kirk" only exists once in your player universe), my favorite approach would be:
    Join any game without setting a name initially. Once in, check the names of everyone. If your last used name doesn't clash, you could set it automatically. Else, let the player enter a new name.
    In worst case, 2 players edit their names at the same time and both set "Kirk" at the same time. So on each name-edit, check if the name belongs to another player and if that player's ID is lower than yours, you have to enter jet another name.

    This has the benefit that you don't have to send any names around.
    FindFriends