question

NJ avatar image
NJ asked

Public rooms lobby system

I want to implement room system like it is in among us.

  1. Player should be able to create room.
  2. Players should be able to see public rooms.
  3. Players can join in public rooms.
  4. Host (player who created room) can click start button and game will start.

Here is my thoughts

  1. When player clicks create room I should call RequestMultiplayerServer api to allocate server and store returned result (ip, port) into external storage. I also need to store game state (waiting) in external storage as well.
  2. I need to get all public rooms from external storage because there is no way to do it only playfab services yes? so I need to implement it on my own.
  3. When we are in room and whenever player clicks start button I just need to update game state from waiting to playing in external storage to hide this room from public ones.

Is this the correct approach? or I am doing it wrong and there is a better way to implement room system like this?

multiplayer
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered
  1. In the common scenario, I don’t think it is necessary to have an external storage for lobby. Lobby in Among Us is a waiting room in an active game.
    Basically, when a room is created, there are 2 methods to fill in more people. Telling friend room information externally to join or using matchmaking system. If implementing external storage, you may store Ip/port and create GUID for the room and it will be convenient for friends to join. It is not necessary but will improve gaming experience. However, it can be done without external storage, and you may also generate certain string for client to recognize. Meanwhile. If enabled matchmaking, players can directly join when matched.
  2. If you need to list public rooms for players, lobby will be required. Please refer to our lobby sample -- Building Lobbies with Azure PlayFab.
  3. It is not necessary. When the game starts, you simply let the server refuse the additional connections from any other players. However, if you want to expose the state of servers to the public, you are on the right track.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]