Download

4.21 Multiplayer game with kill-cam / instant-replay

I’m creating a multiplayer game (1v1 atm) where I want to replay a score event using the replay system. I’ve read about the InMemoryNetworkReplayStreaming feature of the replay system for kill-cams/replays here: DemoNetDriver and Streamers | Unreal Engine Documentation.

It says “The Memory Streamer is special in that it is meant to record, play back, and resume gameplay during a single session. The live game is able to continue, invisibly and silently, while the player is watching a replay, so that the game can be resumed seamlessly the moment the replay ends.”

However, I use StartRecordingReplay() on the gameinstance to start recording, then StopRecordingReplay() to stop recording, and then PlayReplay() to attempt to play it back. Unfortunately, what happens is the client disconnects from the server when the server goes to playback the replay. So only one side sees the replay and then the game cannot continue because the client was disconnected.

Do I need to manage the DemoNetDriver myself instead of relying on the built in methods on the game instance? I was reading some more details and it kind of sounds that way:

“With this system in mind, we can create one DemoNetDriver for the Dynamic Source Levels, and another for the Dynamic Duplicate Levels. This enables us to record live gameplay in the Dynamic Source Levels and then play that data back in the Dynamic Duplicate Levels. By hiding the Dynamic Source Levels and showing the Dynamic Duplicated Levels during replay, the game can continue playing and receiving network updates unaffected by the replay.”

I was looking through the code in the gameinstance for PlayReplay and the first thing it does is DestroyDemoNetDriver on the world, then creates a new reference for CurrentWorld->DemoNetDriver, then calls initConnect on it, which looks like it is what drops the current net connection and connects to the demo net driver that pretends to be the server.

I have done a lot of googling around to see if anyone has some good examples or any advice on this, but it seems everyone always links the replay tutorial, which isn’t what I need at all since it’s for offline viewing. I mostly just need to figure out if this is something the engine supports out of the box or if it’s going to take some manual management to get it working.

Thanks,
Mike

Did you ever resolve? Having same issue

Sorry, we never figured out what the problem was so we moved to a different solution for now.

Have you solved this problem? I have the same problem

Any updates on that? Having the same issue.