Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle first sync event ( sync world ) #68

Open
Unsigno opened this issue Nov 26, 2017 · 2 comments
Open

Handle first sync event ( sync world ) #68

Unsigno opened this issue Nov 26, 2017 · 2 comments

Comments

@Unsigno
Copy link
Contributor

Unsigno commented Nov 26, 2017

For convenience reasons ( eg. initialize visual scene/world ) should be usefull a firstSyncReceived/worldSync or something similar , maybe with pre/post addition .

I can execute once 'client__syncReceived' , but a interesting thing can be add diferent params as syncReceived .

Eg.

beforeWorldSync( theFirstSyncData )
onWorldSync( the objectInstancesCreated ) // this implies divide onAddToWorld ( to onCreateRenderEl onAddToWorld )
afterWorldSync() // the instances are added to the world now
@OpherV
Copy link
Member

OpherV commented Jan 22, 2018

You're correct in that practically in all cases the game engine has "nothing to do" before the first full sync.
but maybe instead of adding to the API we can just make sure that the 'start' for the client game engine only happens after it receives the first full sync.

Thoughts?

@Unsigno
Copy link
Contributor Author

Unsigno commented Jan 26, 2018

Was the original purpose, but as you mention some one should be interested on run some "local scene", maybe loading another assets or waiting for connection . So could be diferent things , handle first sync and allow run step before or when first sync .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants