For the replication itself, I made the server do all the work, I centralized every input action on a method that switches to the right input, all of it is done in the server.
I can’t really give you much direct code support since I’ve not mucked around with the replay system code personally, but is there a chance that it’s network code lag? Maybe offload the replay work to the client so there’s not a chance of dropped packets, or slow net code, or some kind of race condition? Or is there a lot of destroying or creating of actors going on in the SimulateInteraction functions?
You could try recording the replay with a listen server if you aren’t already (eg. “open MyMapName?listen”), we’ve run into issues where certain stuff doesn’t get recorded if it isn’t a listen/dedicated server. Although yeah as muchcharles said, a replay recording basically acts like a client, and so it will only record things that a client would receive. Does one client see the other client jumping etc.?
Yes, every replication works fine, server to client, client to server, client to client, every move is replayed perfectly on the other side.
As for Server RPCs not being replayed, I tried changing every Server RPC to Client. The Server RPC that makes the replication work, in fact replication stop working when I changed to client. Funnily enough, the replay got a little better but still not what I was expecting.
Is there a way to test if replay system will work other then replaying a level? It is really frustrating because I made replication work but the replay does not work so well.
I didn’t know about the listen server, it will be the next thing I try.
Now, the replay system works wonders when there are only player controlled pawns, I cannot make AI pawns work in replay and I can’t figure out why. Is it because I’m using listen server? What could it be?
They work when playing normally, but when it goes to replay they do nothing. Is there any docs I can read to get some help?
Sorry reviving old posts but this new problem is related.
Hey I’m having a similar problem where I want to record the actions that are taken when the player gives keyboard inputs. So I’m trying to replicate the function being called by the key press, by making it a “Server” function. But when the replay starts those functions don’t get called. Is there a way to do that without doing the “?listen” server thing?
I’ve tried making the server function call a client function so that the client function would be recorded and played back, but that doesn’t work either.
Edit: I tried the listen server thing and it didn’t work for me.