Delay replication for spectators

Hi,
I couldn’t find any information how to delay replication to a client from a dedicated server in UE4, any1 knows of it even is possible within current functionality provided in 4.14?

I would like to have spectators in our RTS game running on a dedicated server, but with like 30 seconds delay.

Cheers!

We are using UE4.27 to develop the MOBA project, and we are currently developing the function of watching the battle, which also requires the observer to have a certain delay in real time, do you have a solution

Your best bet is probably to rely on the replay system.

You can use/extend the NetworkReplayStreaming or HttpNetworkReplayStreaming module and connect it to your own server(s).

Epic provides a (supposedly working) streaming server implementation in java, available in engine source code :
https://github.com/EpicGames/UnrealEngine/tree/release/Engine/Source/Programs/ReplayServer

Pros of this approach :

  • Watchers are not directly connected to the gameserver, they connect to the streaming server which can be focused more on bandwidth and less on performance. Reduces load for the gameserver.

  • Data transfer is much more optimized, unlike video streaming - replay system uses builtin replication system, for the gameserver it’s essentially just like 1 additional spectator, then you can hook as many watchers as you want to the streaming server.

  • You can definitely figure out a way to add arbitrary delay. If not on the gameserver side, you could do it on the streaming server or on the client replay module side.

  • Replays can be saved to be watched later. System works exactly the same for saved replays and watching live games.

Cons :

  • Requires streaming server(s) in addition to gameservers.

  • Can be difficult/tedious to implement replication correctly to make stuff work as expected both in-game AND in-replay.

Thanks for your answer.
java implementation is too old that can not use.
I rewrote a set of servers through the documentation and can use it