question

Ronan Doherty avatar image
Ronan Doherty asked

UE4 client/server workflow

Hi. I'm evaluating PlayFab for a project using Unreal Engine and dedicated servers. So far PlayFab looks fantastic but I'm having some teething problems understanding how to implement an existing multiplayer game.

I'm a little confused about the workflow for creating a UE4 multiplayer game with a dedicated server. Typically I would compile a client and server from the same project, just changing the solution configuration in VS from "development editor" to "development server". However the PlayFab BlueprintSDK docs suggest the following:

"To implement both client and server in Unreal, you must create two separate projects, and install each plugin separately."

So what is the workflow for this? Managing two separate projects seems like it would lead to a lot of duplicate code and assets which would need to be maintained identically across two versions of my project.

There is also the ComboSDK described as "for demoing, testing, and special-case circumstances", which admittedly I haven't delved too deep into yet. Does this allow me to work with a single project for client and server? What are the caveats of using this and why is it not the optimal choice for a typical Unreal client/server game?

Finally I noticed the UE4 C++ SDK only has a single plugin. Is this the equivalent of the BP ComboSDK? Does the rule of having 2 separate projects apply to C++ projects?

Any advice on the UE4 server workflow would be very welcome. I'd also love to see some more detailed learning resources specifically aimed at UE4 in the future.

Thanks.

sdks
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

The essential problem with a combined project is the SecretKey, which is required for any Server and Admin API calls. You should never ship any project that contains your SecretKey out to end users, since a user who gets a hold of that would be able to change your game's configuration, modify or delete players, etc.

The separation between Client and Server versions of our Blueprints SDK plugins is specifically due to concern that there's a greater risk of exposure of the SecretKey in Blueprint development.

For our own tutorials, we tend to focus on areas where we've had a lot of requests from the development community. While we haven't had many for Unreal Blueprints, at least one of our users, Andrzej Koloska, has put together an excellent tutorial in his Shooter Tutorial blog: http://shootertutorial.com/2016/01/30/adding-playfab-online-leaderboards/. I'd highly recommend checking it out.

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.

Ronan Doherty avatar image Ronan Doherty commented ·

Thanks for getting back to me Brendan. I see where the problem lies now but I do think there's got to be a better solution than maintaining two projects.

I'm taking a look into the following forum post right now.

Dedicated server code split from client code

It describes a way to separate server code into a different module which can be excluded from client builds at at compile time. I'll have a play with it but I don't have a lot of experience with modules and plugins. It may be useful for your plugin guys in the future.

I'll update things here if I get something like this working.

Thanks.

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.