question

coleazevedo avatar image
coleazevedo asked

[Unreal Engine] "Get Lobby" returns lobby while "Find Lobbies" returns zero lobbies, looking for assistance

Hello,

I'm working with Unreal Engine 5.0.3 using blueprints.

For our project, we're looking to build a game where a user hosts a server from their client then allow for other clients to find available lobbies from a list to then join.

I've had success with getting the hosting client to login with custom ID then create a lobby.

However, when I go into another application instance and login with a new unique ID and invoke "Find Lobbies, it returns 0 results. In the hosting user application instance, if I perform a "Get Lobby" on the newly created lobby, that returns the lobby successfully. However, if I invoke the "Find Lobbies" from the hosting user application instance, that will still return 0 results.

1. I understand that for "Find Lobbies" to work, it requires a user to be connected to the lobby, to be sure, does invoking "Create Lobby" also connect the user to the lobby they've created?

2. When invoking the "Find Lobbies" node, I don't provide any additional parameters to the Make MultiplayerFindLobbiesRequest, I hope the default makes it more open to finding available lobbies. Am I wrong to think so?

3. Could you provide any further clarification with regards to how I can pull data back from "Find Lobbies"?

Let me know if you need further details regarding my set up, and I'll be sure to respond as soon as possible. I've reviewed quite a few of the documentation and feel that I am exhausting the majority of options to resolve my issue.

Cheers!

sdksunreal
10 |1200

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

Gosen Gao avatar image
Gosen Gao answered
  1. I understand that for "Find Lobbies" to work, it requires a user to be connected to the lobby, to be sure, does invoking "Create Lobby" also connect the user to the lobby they've created?

  2. Could you provide any further clarification with regards to how I can pull data back from "Find Lobbies"?

By default, the Lobby needs a connected entity to be searchable. For more details, please see UseConnections section in CreateLobby API.

PlayFab Marketplace Plugin for Unreal is based on RESTful API and can't be used to establish the connections. To create a connected Lobby, please use PlayFab Multiplayer SDKs.

Otherwise, if you do not need real-time notifications, you can set UseConnections to false and also OwnerMigrationPolicy to None, then lobbies do not need connections to be searchable.

When invoking the "Find Lobbies" node, I don't provide any additional parameters to the Make MultiplayerFindLobbiesRequest, I hope the default makes it more open to finding available lobbies. Am I wrong to think so?

Yes, calling FindLobbies with empty request means searching any lobbies.

10 |1200

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

coleazevedo avatar image
coleazevedo answered

Hi @Gosen Gao, Thank you for your response! To my understanding, a lobby requires there be a user connected to the lobby for it to be searchable. However, when I call Join Lobby after creating the Lobby, I receive the following error message:

LobbyPlayerAlreadyJoined: The lobby player is already a member(LobbyId: )

For more context, the game is to be built around lobbies being hosted from a user's PC. So in this instance that is resulting in the error message, a user is looking to host a lobby, so after creating the lobby successfully, I invoke "Join Lobby" and pass in this user's entity.id and entity.type. The error message makes it seem like the hosting user is already connected to the lobby...but if that were the case, why would the lobby still not be searchable?

Hope you can help shed some light on this. Cheers!

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.