question

Justin Heasman avatar image
Justin Heasman asked

Photon Server as Custom Game Server?

Hi there,

Can we use Photon Server (Not Cloud) as a PlayFab Custom Server? If so, do you have any information that will point me in the right direction?

I know you have an example using Unity Networking here: https://github.com/PlayFab/PlayFabGameServer

But do you have one using Photon Server.

Justin

Custom Game Servers
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

·
brendan avatar image
brendan answered

It is possible, though Photon Server isn't specifically designed for it, per-se. The way our custom game server hosting works, we pass in a command line with all the info the server needs, and then monitor the executable so that we know when the instance is done, so that we can then grab the log and output files. Since Photon Server can't use our command line, you would need to write a shim executable which writes out the command line parameters to a configuration file you can then read in when the Photon Server launches, and then not exit that executable until the Photon Server exe is done.

We also provide a basic Unity server project that you can use as a starting point to creating your own, if you want to experiment with it: https://github.com/PlayFab/PlayFabGameServer

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

Justin Heasman avatar image Justin Heasman commented ·

@Brendan Ahh, ok thanks. I have a question about the Server Project. I have followed the instructions and built it. I have added it to my Builds and it says it went from validating to available. I have added a game mode for the game. The problem is that it is not showing up on my server tab and there is no other options to configure the build.

I also built the Server client example and that can't find any game servers either.

Any ideas?

0 Likes 0 ·
brendan avatar image brendan Justin Heasman commented ·

You need to go into the server's configuration and set it as available in whatever region you want to use for testing, and then wait for the server to initialize and get to a ready state. There's more on working with custom game servers in this tutorial: https://api.playfab.com/docs/custom-game-servers

1 Like 1 ·
Justin Heasman avatar image Justin Heasman brendan commented ·

@Brendan Where do I go to access the server's configuration? I have checked all the PlayFab Server tabs and the only thing I can see is the Build as Available and the GameMode. The others are blank.

0 Likes 0 ·
Show more comments

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.