x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Strange DemoReplay Issues

So, I've been trying to get basic replay functionality working for the past couple of hours, but can't seem to go forward with this issue.

I loosely followed the tutorial at https://wiki.unrealengine.com/Replay_System_Tutorial in order to implement some basic replay functionality. What I've got working is this:

  • Basic actor replication, including movement, rotation & one multicast RPC, which works in multiplayer. (2 PIE windows)

  • Start & stop recording of replays both via console commands 'demorec' & 'demostop' as well as cpp.

Now, here are the issues: If I use 'demorec', 'demostop', 'demoplay', the replay puts me into the standard spectator pawn and executes fine, for the most part. However, my multicast RPCs don't seem to get replicated in the replay (though they work in multiplayer on both the host and the client). I tried messing around with them, setting them to server/client only, toggling reliable, etc. but to no success. This occurs in both the editor and the standalone version.

If I use the cpp version, I get something different. Starting & stopping the recording works fine, but when calling UGameInstance::PlayReplay(name), it puts the camera to the world origin & remains immovable (suggesting the spectator pawn/controller was not even initialized). Again, this occurs on both the editor and standalone. When doing this in the editor, it also shows no movement or any of the replicated actors being instantiated (when ejecting the camera and flying around).

This is the relevant C++ code:

 void UDNHGameInstance::StartRecording(FString name)
 {
     StartRecordingReplay(name, TEXT("Testsy"));
 }
 
 void UDNHGameInstance::PlayDNHReplay(FString name)
 {
     PlayReplay(name);
 }
 
 void UDNHGameInstance::StopRecording()
 {
     StopRecordingReplay();
 }

All of these are called from within the player pawn (important?) upon keypress (1 for start rec., 2 for stop rec., 3 for play). Again, PlayReplay does not work in this case. (why?)

TL;DR: So basically, there are two issues right now.

  1. UGameInstance::PlayReplay does not work for me (did I miss some additional config?; I did add the DemoNetDriver to the DefaultEngine.ini as suggested by the tutorial, but have made no other modifications)

  2. Multicast RPCs are not being called. I have read somewhere that this can be circumvented by adding a variable with RepNotify, but this can easily lead to dozens of variables that exist for the sole purpose of recording replay function calls. Surely this cannot be the only way to do it?

Any help would be greatly appreciated!

Product Version: UE 4.19 Preview
Tags:
more ▼

asked Mar 13 '18 at 02:07 AM in C++ Programming

avatar image

xNaXDy
16 2 4 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

This has successfully been resolved using the workaround outlined here: https://answers.unrealengine.com/questions/546577/multicast-not-called-in-replays-1.html

Note that this may make it impossible to make a real-time multiplayer game (which is fine for my situation), since the actor will now always access the DemoNetDriver, which is solely for replays as I understand.

It would be great to get some clarification from a dev though, as to why DemoNet behaves the way it does under certain circumstances.

more ▼

answered Mar 16 '18 at 10:44 AM

avatar image

xNaXDy
16 2 4 9

avatar image pushmatrix Jun 08 '18 at 08:32 PM

I'm having the same issue with multicast not being recorded and working during replays. Any luck figuring it out?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question