question

David Doucet avatar image
David Doucet asked

Running game servers for a solo player (UE4)

From our Unreal Engine client, I would like to connect to a server instance even if I'm testing the game with a solo player. This is mainly for development purpose.

I want client to get a server IP to connect to with that server instance being seamlessly started by Playfab on the server side if needed.

It seems what I'm looking for would be for match making queue to allow for 1 player min size, but it doesn't seem to be something that will be made available based on this thread:

https://community.playfab.com/idea/33285/matchmaking-minimum-size-of-1-player.html

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

·
Sarah Zhang avatar image
Sarah Zhang answered

If your requirement is allocating a server instance for a single player, and the player can obtain its IP address and its Port number to connect to it. You can let the player call the Entity API RequestMultiplayerServer to request a server session from the standby server pool directly. The player can connect to the server session based on the IP address and the Port number that returned by this API.

The idea you mentioned describes a feature that players can enter a server firstly, then wait for other players. It is more like a feature request of lobby servers. Currently, if you want to use PlayFab Multiplayer Server to implement this feature, the workaround is letting one player call the API RequestMultiplayerServer firstly, then connect to the server. After the first player entered the server, the server should run the corresponding logic to call the API CreateServerBackfillTicket to match with other players. You can check the documentation – Using server backfill tickets - PlayFab | Microsoft Docs for more information on server backfill tickets.

Currently, we more suggest using other Azure services and PlayFab together to implement the lobby server. Please check this blog - https://blog.playfab.com/blog/building-lobbies-with-azure-playfab for more information.

3 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.

David Doucet avatar image David Doucet commented ·

Thanks Sarah, that's a lot of valuable information super pertinent to what I am trying to achieve :-). This should get me busy for the day and I'll come back with feedback or questions depending on how this goes.

Thank you!

0 Likes 0 ·
David Doucet avatar image David Doucet commented ·

Some progress today with RequestMultiplayerServer that appears succesful both from the UE4 client Blueprint and also from what I can see from the Servers list on the Playfab web portal.

The IPV4Address and Ports number from the MultiplayerRequestMultiplayerServerResponse seem valid, but I'm unable to establish the connection using 2 methods.

One is the Unreal command "open IP:port" that works with "open 127.0.0.1" when I run my server locally and the other is through a more specific TCP socket API (I'm using an Unreal plugin for that).

Is there something more that needs to be done for the server to accept connections from any client? Is there a way I can monitor traffic on the server and see if my connection attempts reach the server?

Thank you again!

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang David Doucet commented ·

As this readme file from Unreal Multiplayer Server sample repository said, the command you should use to run the client should be something like this.

 .\GameClient.exe 127.0.0.1 -port=30000

Could you please using the IP address and Port number that returned by the API, then run the client again?

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.