question

oglazirin avatar image
oglazirin asked

How to build official PlayFab Custom Game Server

Hi!

I'm following this PlayFab post. It features official PlayFab Custom Game Server which we can host in PlayFab and use as a framework for our own authorative game server.

The idea is amazing BUT the problem is that there aren't any instructions on how do you actually build the server-side project and deploy it to PlayFab.

I'm new to PlayFab and I've never created or deployed server builds to PlayFab before. Could you please answer the following questions for me:

1) How do you actually produce a server build file?

The GitHub project looks like an ordinary Unity project which can be opened in Unity. How am I supposed to produce a single build file from this project? Do I build it using Unity or Visual Studio?

2) What are the main steps for building this CustomGameServer and deploying it to PlayFab

In other words I'm newbie and I have no idea how to do this on my own. Please help :)

Thank you very much!

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

·
Joshua Strunk avatar image
Joshua Strunk answered

Long story short: Just build it like any other Unity project.

The first 45ish minutes from the 2nd day of the Dev workshop is all about the example custom game server. The quality is not great but I believe they do a walk through of this whole flow. Linked to the part below around 24:30.

https://youtu.be/hZCsuXUy2ng?t=24m32s

1 comment
10 |1200

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

oglazirin avatar image oglazirin commented ·

Thank you! You are a lifesaver!

The video tutorial was exactly what I needed. For anyone looking for a fast answer here are the steps for building a custom playfab game server:

1) build a Unity project for Windows x86_64

depending on your Unity project name you will have <project name>.exe and <project name>_Data folder.

2) add both <project name>.exe and <project name>_Data folder to .zip archive

3) upload the archive to PlayFab (as a new PlayFab build)

4) on the Builds tab click on your uploaded build name

this will get you to Edit build settings section

5) Choose the desired Region for your build instance to be hosted in

6) (Optional) configure command line arguments (I added "-titleId=myTitleId")

7) Save the settings and go to the Servers tab

You should see your new build being initialized in the selected region. This might take some time (the amazon EC2 instance neeeds some time to spin off I guess)

That's it! You now should have a running custom game server!

1 Like 1 ·

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.