I am thinking of a multiplayer system with similar to what is possible with games such as Counter Strike where you can join dedicated servers hosting a variety of custom content such as game modes, maps and player skins. However, I was not able to find any information on such systems for Unreal Engine based games. Is this even possible with Unreal Engine based games?
Could somebody maybe point to some information on that topic for me?
It is possible. There is a nice talk about architecture of such systems. In short, ue dedicated server only manage players for current game instance and you have a bunch of services that manages starting instances for you.
Also aws have a wrapper for this needs called “gamelift”, but i didn’t delve too much into aws implementation
Other than this, you’ll need services to manage players\lobbies\chat\etc, EpicOnlineServices (EOS) can be used as a ready solution for this.
If you talking about listen-servers, then, (i didn’t research this subject yet, but) i guess, backend will looks quite similar with exception of part with spawning instances and addition of logic responsible for letting player connect to each other through NAT and other scary things
Overall it isn’t a small task, but it’s completely doable
You can look into Unreal Tournament source code which has a working implementation for sending custom content to players when they connect to the match, without engine source modifications.
In short, here’s what happens :
The whole process starts in GameMode->GameWelcomePlayer override (in UTBaseGameMode.cpp). This is probably the earliest/easiest place you can hook where you gain access to the connecting player’s low level NetConnection.
From there you can gather required custom content (they collect current loaded map, gamemode, inventory classes and mutators), then send a
FNetControlMessage<NMT_GameSpecific> to the connection with the data.
This NMT_GameSpecific message is received on the client and automatically routed by the engine to GameInstance->HandleGameNetControlMessage. Override this in a custom GameInstance class and you can process the received data (UTGameInstance.cpp)
Check which content you already have, and download missing content. This is all done in UTGameViewportClient.cpp (including mounting the new paks at runtime)
Thank you for not only providing a reference but also sketching the general idea of how to approach this matter, greatly appreciated! Unfortunately, you GitHub link does not seem to work/redirects to a page not found. Maybe you could check again?
I even considered Unreal Tournament to be an example of that model but would not have thought that the source code is readily available online.
You need a github account that’s registered in UnrealEngine network, just like for accessing Unreal Engine source code.