I
I
Ivan Petrov2018-06-04 10:39:13
Game development
Ivan Petrov, 2018-06-04 10:39:13

How to implement a master server for a project on Unreal Engine 4?

Hello.
Tell me how to implement a master server and in which direction to look at all.
I have a multiplayer project on Unreal Engine 4. There is a dedicated server for the project (a game server, this is the functionality of the engine). A dedicated server is like a session, a map is open on the server, players (clients) connect to it and play on this server.
UE4 dedicated server is a separate exe program and now you need to run it manually.
What I did:
1. A C# program to launch a game server with the settings I need - UE4ServerManager
2. web api on php + mysql - a list of game servers with ip, port and game settings is stored here,
how everything works:
1. through UE4ServerManager I run game server on VDS with windows 10
2. first, a record about a new game server enters the database
3. then the game server itself starts up
4. the game server immediately connects to the database, finds itself and downloads its settings
5. Clients can get a list of servers from the database and connect to the one they need.
Now it's all rather inconvenient.
What I need:
I think about the same, only without manually launching game servers. This requires a master server, which must process new players, start the game server when enough players have gathered, transfer players to the game server.
At the same time, all this seems to work on one VDS. But I think you need one VDS for the master server and some number of VDS
for the game servers.
How can this be implemented, on what, there are some examples, does anyone here have experience in implementing this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mysterion, 2018-06-04
@Mysterion

I understand that you want to remove the ability for players to choose a server on their own.
In UE4ServerManager, make the address automatically added to the database after the server starts.
When connecting to an online game, a list of all servers with free slots is taken from the database and the player is sent to a less or more loaded one, it is up to you to decide how to fill the servers.
Check online servers by CRON. If there are fewer free slots for all servers, for example, 5, then automatically create a new server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question