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?

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

Since you have mentioned that you are using BluePrints, which should be GitHub - PlayFab/UnrealMarketplacePlugin: Source code for the PlayFab Marketplace Plugin for Unreal. And it is based on PlayFab REST API, which is stateless. So, the CreateLobby API cannot connect the user to the lobby. To create a searchable lobby, you need to use Azure PlayFab Lobby SDKs - PlayFab | Microsoft Learn.

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?

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.