Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by George Goslin · Jul 22, 2020 at 10:45 PM · MatchmakingCustom Game Serversunrealdocumentation

Unreal Engine Dedicated Server/Client Architecture,Unreal Engine 4 Dedicated Server - Client Architecture

Good afternoon,

I'm trying to get some clarification on an ideal architecture configuration for my game. I’ve been scouring all the available documentation and forums posts, many of which have been leading me in the right direction I think, but there’s a lot of ambiguity because there’s a lack of UE4 specific knowledge for my ideal use case as far as I have found.

It's a game with dedicated servers, hosted by Playfab and not external, ideally, and a main multiplayer feature is a server browser that lists all available, running servers.

I have managed to get a successful response with a Cloudscript function call for ListMultiplayerServers, as I needed to maintain client/server security.

And I can display those servers on a client-side server browser UI widget, though they're only for one region at the moment and all have the same name, which is the Region, as there don't seem to be any Server name-specific parameters.

The questions I have now are specific to how I need to configure the server and multiplayer logic in relation to available Playfab calls:

  • For my UE4 Game Instance, do I need to make a call to start the game server instance with a 0-player lobby, waiting for players to join, or can it remain in standby mode in the server browser and some type of StartGame call be made to kick off the server from the first connecting client? This likely would be answered if I knew what is happening for the server executable on the server-side. Once builds are uploaded, are they ran automatically, and that's Standby mode? Or is Active when the executable is actually ran. Please elaborate on this, if possible.
  • In this type of model, when would Server Shutdown occur? I assume a call made within the game instance of the headless server build once a check happens determining all connected players have disconnected? If this is the case, will this server still remain in Standby Mode when a shutdown call is performed?
  • I will also want to implement a more standard form of Quickplay/Matchmaking, so do I need to tie any of that logic specifically into the dedicated headless server, or are those all client-side calls to kick off a server when needed, if none are available?
  • Is the dedicated server management in Playfab tied in to Matchmaking so much that matchmaking is required to be used in order to find/join any available servers, both empty/standby ones as well as running servers with players?
  • Each server will have a lobby map/game mode upon initial player join, where players can choose sides, modify equipment while waiting for a timer or ReadyUP-type function to start the first match. After that match, the players and their teams, data, etc. would be retained and returned to the lobby, waiting for the next match to start. (There will be a playlist of maps, with players returning to the lobby after each one) From how I understand it regarding Unreal Engine 4, this would need to be maintained within one running session, containing multiple game modes.

The server/gameplay flow I’m trying to implement is ideally as simplified as I can make it, as my focus is more on gameplay for more complex development. I need players to have a level of control over what servers they can see and join, akin to how games like Battlefield or ARK use their server browsers. A server browser that simply displays all available servers, with the potential to filter those servers by certain parameters, likely received by server-specific details.

However, I would still like simplified, standard matchmaking in the main menu. Assuming these functions are all modular, I can implement a party system down the road as well.

I’m also primarily using blueprints but can make Cloudscript calls and work in C++, if necessary. Blueprints just simply provide a cleaner and less error-prone method to get a testable, working concept build up and running quickly.

I do understand after looking through many of the forum posts and documentation that you have limited UE4 and Blueprint specific materials to reference, however, whatever assistance you can provide for this specific workflow I would like to document and post, as well. This is a pretty standard model for UE4 template projects and Playfab provides a quicker back-end solution with Blueprints than Gamesparks/Gamelift from Amazon, so it’s ideal for our team and likely many others to reference for the future.

I’ve tried to be as descriptive as possible, but if any of this isn’t clear or is too confusing, please let me know and I’ll do my best to clarify on my end.

Thanks!

George

Comment
Rohan

People who like this

1 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by SethDu · Jul 24, 2020 at 07:53 AM

  1. When the server instance is in stand-by state, the VM is ready to start the but due to the implementation of GSDK, the process is hang-up on GameserverSDK.ReadyForPlayers(). The complete process starts when the stand-by mode turns into active.
  2. Server won’t automatically shut down unless error occurs when it runs too long like for few days. Otherwise, you need to shut it down via your own code. It is a feasible solution that when all the players are disconnected, the server instance can go to the shut-down process, but don’t forget process the data during this game before shutting down. I am not familiar with UE4, but for the Unity sample, we simply call Application.Quit();
  3. If you have your own matchmaking system, you can still request for multiplayer server manually via RequestMultiplayerServer. I will suggest disable the client permission of directly requesting for servers, meanwhile, create a Cloud Script function to handle this process, because in the function, you may do some verifications before the request is sent, for example, check the request frequency, does this player already has an active session or make sure this player holds a valid matchmaking result.

>>Each server will have a lobby map/game mode upon initial player join, where players can choose sides, modify equipment while waiting for a timer or ReadyUP-type function to start the first match. After that match, the players and their teams, data, etc. would be retained and returned to the lobby, waiting for the next match to start.

Lobby(for matchmaking) is not supported currently and this game logic should be implemented on your own. Multiplayer 2.0 doesn’t have the common lobby feature where players can select their slots/seats. However, the temporary team feature can be fulfilled by Shared Group feature and team information can be shared in the Shared Group Data.

You may also refer to the case study document from HICON Games on the website: https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/playfabgsdk_guide. In addition, even though we don’t have an official sample for UE4, the server logic and lifecycle of server session is very similar, please refer to the GitHub repository:

  • https://github.com/PlayFab/gsdk
  • https://github.com/PlayFab/gsdkSamples
Comment
Christopher Gong
George Goslin
Rohan

People who like this

3 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image George Goslin · Aug 06, 2020 at 09:36 PM 1
Share

We've got a rough implementation successfully loaded and running. Thanks for the assistance and the detailed answers Seth.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Matchmaking with server 2.0 1 Answer

    Matchmaking more than 2 players at once 1 Answer

    How do I find the fields to input into RedeemMatchmakerTicket in UE4? 1 Answer

    Check Playfab ID format 1 Answer

    How do I get The team ID of a player in Unreal Blueprints after calling GetMatch? 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges