synchronize a timeline between every client (and new client?)

I think i need to know how to do this to synchronize a timeline between all my connected clients


because i have a timeline which is playing and replicated but…

the update pin exec fine on all clients but they are not playing the animation at the same time

i see there is a pin to “set new time” on the timeline, so i think i may call for a multicast rpc event named for example “synchronize timeline” to exec this pin on all client to set the time to 0

but its still desync for everyone because of the network delay right? i need a way to execute this “synchronize timeline” on all client at the same time

is that possible?

or i am really overthinking the thing, and there is a little checkbox to check somewhere to have this timeline sync on all client automaticly :o

bonus question: and how to deal with this “desync” if a new client connect after that the timeline is already in sync for all clients?

Im pretty sure clients will be experiencing a desync no matter what you do. I believe current practice (if you need absolute server authority) is to have each client recieve an updated frame from the server at set intervals to minimize “desycn” (which would be mostly graphical since all calculations are handled server side in this setup), but implemented poorly, it leads to alot of rubberbanding and poor client experience.

I guess you could TRY and sync everyone to the slowest client by calculating everyones ping and implementing an appropriate delay, effectively “ripple casting” the timeline to everyone so it arrives at more or less the same time at each client. I don’t see that as being practical for mundane events though and may only be applicable if you really really need to sync things for major triggers and whatnot.

My understanding of netcode is only basic though so if someone more knowledgable comes along, please feel free to correct me.

Just output a timeline “time” float and set the new client to start playimg from that position.

i wonder how ‘network racing game’ does their “3.2.1 GO” things

maybe i need this thing to start my timeline/synchronize on all client my timeline

in fact my simple goal yet is to move a platform along an axe, i want the platform to be at the same place for every client, i expected that the timeline with replicated option checked would ensure this for me but its not

its easy to use timeline for a single player game, but how about timeline with multiplayer game?

Well at any rate, a ping corrected position update call with a lerp to smooth the transition would probably be wise whenever working with time sensitive network events.

Well you cant really expect things to be smooth if youre already exceeding 255ms of ping. Thats a quarter of a second already! Over 10 times greater than the delay humans can notice by eye.

You need to divide the ping by 2 since the server is only sending the command (ping is send AND recieve delay). This system WONT be perfect since at the ping levels youre working with, you would also expect fluctuating/unstable connections. So depending on how the network is, the corrected time could be off by a wide margin. Still better than nothing though.

The prediction/interpolation happens outside the timeline. You want a lagging client’s timeline to “catch up”, so you use an interpolate to accelerate the timeline playspeed by a certain factor so that it tries to catch up to the server timeline. Making this happen over more frames makes it smoother, but there will STILL be a desync. Making it happen over fewer frames would be the most accurate representstion (client side) of where the server timeline is, but leads to rubber banding.

You didnt implement a “time in seconds” float output in your timeline. When a new player joins, it should request from the server the current time the timeline is on and start playing from there (hooks up to the “new time” input node if im not mistaken). And dont hook it up to play from start. Just set the start time to 0 of you wanna play from the start. Makes your code much more flexible.

ok i think i begin to understand something with your help, i didnt know i could play with timeline playspeed

you just give me a new hope to resolve my stupid problem :o i will need time to translate this in blueprint code without error :o

You forgot to replicate time line …

Why you just do not use RepNotify? Create bool variable call it for example: “StartTimeline” and set Replication to RepNotify.
On the server event Set that variable to True.
On StartTimeline_OnRepNotify function use Switch has Authority, connect remote node with your Bool variable (if true) and call another Event (one with with timeline).

Same as example above, just instead of Bool variable use Integer and change it on the server (decrease every second), use RepNotify to notify clients.

Remember Timelines have a checkbox to replicate their play position.