Multiplayer
This guide assumes you have minimum knowledge about multiplayer in Unreal Engine.
It does not aim to teach you how to create multiplayer games in Unreal.
If you are new to multiplayer in Unreal Engine, I would suggest you to read this Multiplayer Network Compendium.
Overview
The first important thing to know is that only the server will generate the dungeon.
The clients will replicate the room instance list from the server and then load/unload accordingly the levels.
If you look at the state machine above, both server and client start in a state idle
.
When the Generate
function is called on the server, it will trigger a generation process.
It will run the CreateDungeon
function after all previous rooms was unloaded.
When this function is ended, it will replicates the new room list to the client.
When the client receives the replicated room list from the server, it will also triggers a generation process.
However the client does not run the CreateDungeon
function and loads directly the new rooms.
Finally it will goes back to the idle
state like the server.
This system is beneficial because, unlike the previous versions of the plugin, any client joining after the server has generated the dungeon will properly load all rooms.
Also this ensure that all clients have the same rooms as the server.
However, a lot more data will be sent over the network, especially if you have a huge amount of rooms in your dungeon.
How to do actor replication with this plugin
- Doors are properly replicated over the network.
However, you still need to do some logic correctly on your project in order to make it work properly.
See the multiplayer section of the door wiki page for details on it.