Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

Advertisement

Hello, visitor! These forums are run off of the revenue generated from these ads. If you'd like to support us, please whitelist us or consider donating:

#1 2016-12-05 15:34:35

HG
Member
From: null
Joined: 2017-08-16
Posts: 2,053

Restore client sync for timed doors

The timed doors being synced on the server are nothing more than laggy. Levels that require special timing jumps with these blocks, like "Give Up", are impossible to play if you have lag, because they will trigger after or before they're supposed to.

Offline

Wooted by:

#2 2016-12-05 16:02:00

hummerz5
Forum Admin
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,797

Re: Restore client sync for timed doors

Can we come up with a compromise that preserves universal time doors, but prevents that lag situation?

Uh, how accurate are system clocks these days? We could do seconds % 5...

If we could just sync once, then the client clock could take over.

Offline

#3 2016-12-05 16:19:05

HG
Member
From: null
Joined: 2017-08-16
Posts: 2,053

Re: Restore client sync for timed doors

hummerz5 wrote:

Can we come up with a compromise that preserves universal time doors, but prevents that lag situation?

Uh, how accurate are system clocks these days? We could do seconds % 5...

If we could just sync once, then the client clock could take over.

The problem seems to be that Flash tends to unsync everything if it's out of focus. Switching tabs for some seconds is enough to mess up with the game.

Offline

Wooted by: (3)

#4 2016-12-05 16:54:51

Koya
Fabulous User
From: That game
Joined: 2015-02-18
Posts: 6,198

Re: Restore client sync for timed doors

Forget needing to sync using an EE server, use timestamps.

https://www.desmos.com/calculator/aawkswhbnx πŸ‘Œ

Where x is your timestamp (in seconds), t is the timerdoor length, and y is if the door is active or not. This would allow for doors to have different times and be synced.

Last edited by Koya (2016-12-05 17:13:22)


giphy.gif

WfSi4mm.png

Offline

Wooted by: (2)

#5 2016-12-05 19:16:51

hummerz5
Forum Admin
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,797

Re: Restore client sync for timed doors

HG wrote:

The problem seems to be that Flash tends to unsync everything if it's out of focus. Switching tabs for some seconds is enough to mess up with the game.

but if we derive the proper state of the gates by the client clock will they still get "unsync"ed?

Koya wrote:

timestamps

yes I thought that was the reason for the client clock.

Timestamps relative to whom? The client? The server? Seems we need to agree with the server. How do we account for the round-trip delay? Your graph confuses me.

Offline

#6 2016-12-05 19:25:00

Koya
Fabulous User
From: That game
Joined: 2015-02-18
Posts: 6,198

Re: Restore client sync for timed doors

hummerz5 wrote:
Koya wrote:

timestamps

yes I thought that was the reason for the client clock.

Timestamps relative to whom? The client? The server? Seems we need to agree with the server. How do we account for the round-trip delay? Your graph confuses me.

We would have UTC timestamp, we can all get the same millisecond. The graph shows the state of a timerdoor given your time 'x' and the timerdoor length 't'.


giphy.gif

WfSi4mm.png

Offline

#7 2016-12-05 20:12:40

hummerz5
Forum Admin
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,797

Re: Restore client sync for timed doors

Koya wrote:

can all get the same millisecond

this is the thing. how do we do that?

Offline

#8 2016-12-05 20:14:42

Koya
Fabulous User
From: That game
Joined: 2015-02-18
Posts: 6,198

Re: Restore client sync for timed doors

hummerz5 wrote:
Koya wrote:

can all get the same millisecond

this is the thing. how do we do that?

Because http://www.ntp.org/ exists we can all have the same millisecond.

If 2 computers were asked at any moment to give the exact timestamp they will give the exact same timestamp (assuming the code activates at the same time).


giphy.gif

WfSi4mm.png

Offline

#9 2016-12-05 20:28:01

hummerz5
Forum Admin
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,797

Re: Restore client sync for timed doors

Yes, good ol' network time whatnot. See my first post:

hummerz5 wrote:

Uh, how accurate are system clocks these days?

You're answering "they're more than capable" yes? Then its easy as (seconds % 10) (> | <) 5?

Offline

#10 2016-12-06 02:04:22

Tomahawk
Member
From: BiH
Joined: 2015-02-18
Posts: 1,625

Re: Restore client sync for timed doors

When in doubt, create another message type ^^

Then watch it fail horribly because latency is a thing.

Or it'll kinda work, by creating a low-ping master race.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this clichΓ© blind them.

Offline

#11 2016-12-06 03:10:10

hummerz5
Forum Admin
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,797

Re: Restore client sync for timed doors

Tomahawk wrote:

When in doubt, create another message type ^^

Then watch it fail horribly because latency is a thing.

Or it'll kinda work, by creating a low-ping master race.

Yeah, but if Koya's on the right track about the automatic system time thingy being accurate, then you just have to define a rule for all clients to follow, then messages are unnecessary.

Offline

Wooted by:

HG

#12 2017-03-25 22:05:43

kubapolish
Banned
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-19
Posts: 1,033
Website

Re: Restore client sync for timed doors

first ee is lagging and i'm like 10 fps at 2 fps lag spikes, now i have to wait 10 seconds before actually dying and timed doors are laggy too. make it client-side kthxbai


β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ

Offline

#13 2017-05-15 22:56:04

HG
Member
From: null
Joined: 2017-08-16
Posts: 2,053

Re: Restore client sync for timed doors

Bump. I really want this to be part of the big update. I've gotten enough of worlds with timed blocks that are impossible to beat due to even the smallest of the lag.

Offline

#14 2017-05-15 23:16:21

LukeM
Dev Team
From: England
Joined: 2016-06-03
Posts: 2,435
Website

Re: Restore client sync for timed doors

I know that Ive brought up Factorio a lot when talking about how things like this should be done... but it really is a well made game, so I think im going to do it again

The way that they do anything that needs to be synchronised is to never skip a tick (every message has a timestamp, and everybody processes every single tick and message in the correct order)
They also impliment some sort of fancy latency hiding (basically allowing a window where the client assumes that its going to recieve (for example) the placed message after it has been sent)

If EE were to do this, then this would fix a HUGE number of problems, including the timed door thing, and allow for a lightweight way to detect hackers (if every tick is processed the same, then it would be very easy to check movements)

If not, then there probably wouldnt be any way to do it, because if you do it client side based on ticks, then it will eventually be so far off that any multiplayer timing will be ruined, if you do it client sided based on the time any skipped ticks (or ticks that take longer, depending on how EE manages not being able to update fast enough) will cause the timed doors to be out of sync with the rest of the game, and if you do it server sided, then you have the latency problem

Last edited by LukeM (2017-05-15 23:18:08)

Offline

LukeM1494886581660010

Board footer

Powered by FluxBB

[ Started around 1540203538.5231 - Generated in 0.045 seconds, 10 queries executed - Memory usage: 1.39 MiB (Peak: 1.6 MiB) ]