Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Improve Engine Timer accuracy and World time sync #5772

Merged
merged 52 commits into from
Apr 15, 2022
Merged

Improve Engine Timer accuracy and World time sync #5772

merged 52 commits into from
Apr 15, 2022

Conversation

speigg
Copy link
Member

@speigg speigg commented Apr 15, 2022

Summary

Engine Timer accuracy has been improved by calculating elapsedTime based on high precision starting time, rather than accumulation of deltas. Max delta logic has been moved into world execution.

World time sync has been improved by coordinating the world's elapsedTime across the network, including correction for latency using each computer's local clock time. Elapsed time is synced immediately when the world is joined. NetworkWorldAction.timeSync() has also been added to ensure that clients stay in sync over longer periods of time.

Checklist

  • CI/CD checks pass npm run check
    • Linter passing via npm run lint
    • Typescript passing via npm run check-errors
    • Unit & Integration tests passing via npm run test
    • Docker build process passing via npm run build-client
  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Reviewers

Reviewers for this PR

@speigg speigg requested a review from HexaField April 15, 2022 03:51
@speigg
Copy link
Member Author

speigg commented Apr 15, 2022

I don't know why this test is failing

  avatarFunctions Integration
    loadAvatarForEntity


loadAvatarForEntity failed mixamo/vanguard.fbx TypeError: window.URL.createObjectURL is not a function
    at FBXTreeParser.parseImage (/Users/gheric/GitHub/xrengine/packages/engine/src/assets/loaders/fbx/FBXLoader.ts:279:25)
    at FBXTreeParser.parseImages (/Users/gheric/GitHub/xrengine/packages/engine/src/assets/loaders/fbx/FBXLoader.ts:214:32)
    at FBXTreeParser.parse (/Users/gheric/GitHub/xrengine/packages/engine/src/assets/loaders/fbx/FBXLoader.ts:142:25)
    at FBXLoader.parse (/Users/gheric/GitHub/xrengine/packages/engine/src/assets/loaders/fbx/FBXLoader.ts:128:59)
    at Object.onLoad (/Users/gheric/GitHub/xrengine/packages/engine/src/assets/loaders/fbx/FBXLoader.ts:89:24)
    at /Users/gheric/GitHub/xrengine/node_modules/three/build/three.cjs:28365:35
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) 
    ```

@HexaField HexaField merged commit 92a38d8 into dev Apr 15, 2022
@HexaField HexaField deleted the client-sync branch April 15, 2022 09:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants