Unreal Engine 4 - Instant Replay System

Hi guys,

I’ve been doing research into UE4’s current replay system and I figured out that replays can only recorded on the Server since the call to SpawnDemoRecSpectator calls into the AuthGameMode, which only exists on the Server. How would I stream/send the replay to the Clients that are connected? I want to implement an instant replay system such that all connected Clients should be streamed the replay. Is there a reason why demo recording is done on the Server and not the individual Clients? I’ve looked at the different types of streamers, but I’m not entirely sure how they work. I only know that the NullNetworkReplayStreamer streams network traffic to disk. I’m not entirely sure what the HttpNetworkReplayStreamer does, I would assume that it streams replays using Http requests, but I’m not sure how that would fit into what I would want. Any help would be appreciated, thanks!

I don’t believe you can do instant replays with the current replay system, which kinda sucks as many FPS and sports games could benefit from having the feature available out of the box. 4.11 does support clientside demo recording but I don’t believe there will be a way to playback the demo for an instant replay feature.

If you implemented an instant replay feature it would be best to replay anything from the server’s perspective.

Do you know what the purpose of the DemoRecSpectatorController that is spawned? From reading the code, it seems like the DemoRecSpectatorController is spawned on the Server that lives on the DemoNetDriver and it is set to Replicate. However, I’ve tried printing out the number of PlayerControllers in the World on the Clients through an RPC, but the DemoRecSpectatorController doesn’t seem to be replicating to the Clients since it prints out 1 on all Clients. Would there be no way of streaming the replay to the Clients?

I’m no avid coder and got this info 3rd hand maybe you can make sence of it.

"
What you are trying to do is an instant replay mechanic. The intended system to use for the demorec for that specific application is the “FInMemoryNetworkReplayStreamer”. You can specify which streamer to use in your .ini file for your game. You will want to look at “TimeBufferHintSeconds” which is the amount of recording to keep in your memory that is “rewindable”.

That is the best quickstart I can give on the subject. There is not much documentation to search beyond reading through the code. They are releasing documentation from the docteam sometime soon on it."

If you get somewhere with it I’m looking to replay last 10 seconds on an event in multiplayer myself.

Also note: