question

bieberneit avatar image
bieberneit asked

,Matchmaking players not connecting

Hey everyone :)

Just some background information before I describe my problem.

I build a unity game with the fishnet networking solution, for the transport inside fishnet im using the tugboat transport, the game itself works and players can connect. ( on locaalhost and remote private server)

The game consists of 2 scenes, the main menu and the game scene itself.

The game scene has the whole networking stuff implemented so I am using this scene also as the server scene that has everything needed for playfab implemented. (I think)

On the server is a class that derives from monobehaviour with following functions:

static void OnPlayerConnected() => adds players to list and UpdateConnectedPlayers()
PlayFab.PlayFabMultiplayerAgentAPI.Start(); => inside the start function       
PlayFab.PlayFabMultiplayerAgentAPI.ReadyForPlayers();  => Coroutine startet after start      
PlayFab.PlayFabMultiplayerAgentAPI.SendHeartBeatRequest(); => Coroutine startet after start

Everything works with the matchmaking and a server gets spawned as soon as 2 players are matched.

The docker logs on this server are also looking fine.

But I cant get my players to connect to the server, what am I missing?

Currently im doing it like(the correct ip and port is returned):

    private void OnGetMatch(GetMatchResult result){

	string ip = result.ServerDetails.IPV4Address;         
	Port port = result.ServerDetails.Ports[0]; tugboatTransport.SetClientAddress(ip);
	tugboatTransport.SetPort((ushort)port.Num);
	tugboatTransport.StartConnection(false); // false = isServer
    }
,

Hey everyone :)

Just some background information before I describe my problem.

I build a unity game with the fishnet networking solution, for the transport inside fishnet im using the tugboat transport, the game itself works and players can connect. ( on locaalhost and remote private server)

The game consists of 2 scenes, the main menu and the game scene itself.

The game scene has the whole networking stuff implemented so I am using this scene also as the server scene that has everything needed for playfab implemented. (I think)

On the server is a class that derives from monobehaviour with following functions:

static void OnPlayerConnected() => adds players to list and UpdateConnectedPlayers()
PlayFab.PlayFabMultiplayerAgentAPI.Start(); => inside the start function       
PlayFab.PlayFabMultiplayerAgentAPI.ReadyForPlayers();  => Coroutine startet after start      
PlayFab.PlayFabMultiplayerAgentAPI.SendHeartBeatRequest(); => Coroutine startet after start

Everything works with the matchmaking and a server gets spawned as soon as 2 players are matched.

The docker logs on this server are also looking fine.

But I cant get my players to connect to the server, what am I missing?

Currently im doing it like(the correct ip and port is returned):

    private void OnGetMatch(GetMatchResult result){

	string ip = result.ServerDetails.IPV4Address;         
	Port port = result.ServerDetails.Ports[0]; tugboatTransport.SetClientAddress(ip);
	tugboatTransport.SetPort((ushort)port.Num);
	tugboatTransport.StartConnection(false); // false = isServer
    }
Matchmaking
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

·
Gosen Gao avatar image
Gosen Gao answered

You can manually start a server in Game Manager or with API Multiplayer Server - Request Multiplayer Server - REST API (PlayFab Multiplayer) | Microsoft Learn and try to connect to it to see if the issue still occurs.

BTW, have you tested your server locally with LocalMultiplayerAgent Overview - PlayFab | Microsoft Learn? We recommend testing your server locally to make sure it works before deploying it online. You can also debug your server with it to know the cause of the connectivity issue. Here are some debug tips you can refer to: MpsSamples/Debugging.md at main PlayFab/MpsSamples GitHub.

2 comments
10 |1200

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

bieberneit avatar image bieberneit commented ·

Thank you for your answer, yes I did but I am unsure on how to test matchmaking with it, how would I connect my matchmaking queue to the locale test?

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao bieberneit commented ·

Since it is a connectivity issue, you don't need to test the Matchmaking locally. After you start you server with Local Multiplayer Agent, you can test the connection directly.

0 Likes 0 ·

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.