Download

How to communicate between dedicated servers?

For MMO games, there may be dozens of map levels. Thousands of players are on different maps. The architecture of UE4 is that each map needs to start a dedicated server separately.
When players go from map A to map B, they will disconnect from the dedicated server for map A and establish a connection with the dedicated server for map B. Because two dedicated servers do not share GameInstance and may run on different computers. The only GameInstance with information comes from the player’s client. In this way, players can change their own gold coins and props when switching maps, while the ‘B map’ dedicated server may not be able to detect it.
So how to communicate effectively among the servers of MMO?
For example, when a player moves from map A to map B, map A sends the player’s information to map B. It includes a key to identify the player’s information, which is used to ensure that the player connected to the proprietary server ‘map B’ is indeed transferred from ‘map A’, so as to prevent hackers from trying to connect directly to the dedicated server ‘map B’.
When map B receives the player’s connection, it recreates the player’s Character and other Actors which owner is this player according to the information provided by map A and compulsorily synchronizes it to the player. Make sure that there is no change in the player’s data before and after switching maps.