Networking | Lobbys | Dedicated Servers

Hello,

I need some advice on how to create a good server architecture for my game.

My goal is a simple lobby system like most of modern multiplayer games offer.

  1. Login
  2. Find Game | Search Game | Play (whatever you call it)
  3. Lobby/Room where players can pick weapons, characters etc…
  4. Start the game -> play -> return to main menu

My problem is the transition from step 3 to 4.

I guess I need 3 main components.

  • Login Server
  • Master Server | Matchmaking Server
  • Gameserver | GameInstance

I just don’t get how I can create a dedicated server instance from the master server. Is the Masterserver an UE4 Server or do I only talk to him through HTTPRequests?

It should be possible to do this since Paragon (the MOBA developed my EPIC) uses the exact same steps.

My thought so far are:

  1. Host an non UE4 MasterServer in an scalable cloud (AWS, Azure, DigitalOcean)

  2. Talk to the Server through HTTPRequests

  • 2.1. Client -> Send a request (I want to play!)
  • 2.2. Server -> Has a list of players who are searching for a game
    
  • 2.3. Server -> Spawns an UE4 Dedicated Server Instance and send the players the IP (But how can I Spawn an instance?)
    
  • 2.4. Client -> Performs a Server Travel to the IP recieved by the Server
    
  1. No normal UE4 stuff can happen.
  • 3.1. Choose Weapons, Characters, etc.
  • 3.2. Ready Up
    
  • 3.3. If everyone is ready -> SeamlessServerTravel to the Map
    
  • 3.4. Wait for all players to load
    
  • 3.5. Play the game 
    
  • 3.6. ServerTravel back to the MasterServer
    

Would this work or are there other ways/solutions that would fit better.

I am thankfull for every advice.

Warning: If you think you can do these all by yourself as well as make the actual gameplay, you’re probably pushing too far;

1)Check out VaRest (free plugin) - It’s the way things are done (although you can use any language you want)
A single master server is not going to be enough for your game; you probably want regional servers and some other persistent storage ones that replicate database changes etc
2)For all these + matchmaking you can use a network like photon or a service like steam (no storage here) OR create it all by yourself. So basically if you do it customly, you need to go through all the “looking for game” players, compare stats, levels etc and group em up together
3)Upon composing a team, spawn somekindof server instance(new VM/container blabla) and normally connect everybody to it
4)Once the game has ended , send data back to the main servers and push the players to the menu

Services by themselves are not able to scale your programs; you need to make em scalable. Excuse me and don’t get offended by I don’t think you’regoing to go so far with your project without even watching some training streams/introductory tutorials let alone reading some books on building scalable systems. If such stuff are not made perfectly it all ends up in chaos

Ofcourse I know I can’t make all this from Scratch and I dont intend to. I was just asking if this was at least at some point the right approach.

I allready read into Photon but I didn’t really understand how I would use it. Because if I use Photon for multiplayer don’t I replace the UE4 networking system with it?
Or are you suggesting to use a photon server as a master server? Photon would also include LoadBalancing which comes in handy.

Steps 3 and 4 are all handled by Unreal networking and the normal client/server architecture of the engine. You don’t have to be offline to have a lobby. The server can have a lobby map with game logic for character / weapon selection. When the game determines that all players are ready it can seamless travel to you map and play the game. It can even travel back to a lobby between maps or chose to disconnect everyone back to the main menus and start again.

I’ve begun to answer questions about similar setups in the thread about Paragon Servers

1 Like

“following”.

Denozone I am looking for same solution for our TPS game for online matches like counter strike, dota or paragon.