ige._currentTime not what I expected

Post your help queries and engine programming questions here

ige._currentTime not what I expected

Postby robaldred » Mon Nov 04, 2013 5:05 pm

Hi Rob,
( I could be barking up the wrong tree here)
I was under the impression ige._currentTime on the client would be: server time - network latency.
It seems to be:

serverstart - clientstart - (roundtrip / 2)

I kind of expected ige.network._latency to be half the roundtrip, as it stands it actually includes the difference between server start time & client start time.

Code: Select all
# client log:
IGE *log* [IgeSocketIoComponent] : Time sync, client clock -27511ms behind server, send timestamp: 29994, local timestamp: 2483

# server log
IGE *log* [IgeSocketIoComponent] : Time sync, server clock 27511ms in front of client, roundtrip: 0ms, send timestamp: 29994, local timestamp: 29994

This causes problems with the streamDestroy interpolation fix you implemented a few weeks ago
Because it uses currentTime - serverTime to calculate the delay until an entity should be destroyed

Code: Select all
destroyDelta = ige.network.stream._renderLatency + (ige._currentTime - data[0])

This gives me a massive negative value around -20000 it
Because it started my client around 20 seconds after i started the server

Either the syncing of ige._currentTime is wrong or the destroyDelta needs ige.network._latency taking off it.
Doing the later gives me a destroy delta of around 80 which is what id expect with a render latency of 80 and a server on localhost. I have sent a pull request with this on.

Any thoughts?
I don't work for Irrelon. All comments are my own.
I would strongly encourage anyone building production projects with Isogenic to buy a premium licence, it costs very little and will help towards continued development of the engine. Irrelon have spent thousands of hours developing this wonderful platform with many features found in AAA game engine.
User avatar
Posts: 243
Joined: Wed Oct 23, 2013 8:09 pm
Location: Manchester, England

Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest