-
Notifications
You must be signed in to change notification settings - Fork 159
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
Netplay not synced when using start function #542
Comments
Hi, thanks a lot for reporting this! I believe |
Cool game btw! I love Nidhogg. |
I ran into a desync issue and fixed it because of this thread. Thanks for documenting this! My fix: CanyonTurtle/PING@a045f98#diff-d924ca21d81d7d5a59eb9e10d3e2689c4c58a7e28e6ecce6a064701666f5a730 My game: P.S. let me know what you think @aduros of the game! I'm not done with it yet but it's up there. |
I built the game from the linked commit and the issue is clearly present. To elimiate the case of I checked a I managed to break at the first Tricky! Would be nice to test again if we ever fix globals for netplay (is it even possible?) |
I was initializing my game inside the
start
callback, but this lead to a memory access error when trying to use netplay, or if I defined empty arrays at declaration likelet players: Player[] = [];
then the game would render but with entities missing on the client player's side. The host would see all the entities as well as inputs from the client player, but the client's game was broken.I fixed it by moving initialization out of
start
and doing it at top level.Is
start
just not supported yet for netplay?This is a very cool feature, by the way! I love how simple you're trying to make it.
Here's my game for reference: https://github.com/1j01/polywogg
If you check out bcbf7aaa43 (before this workaround commit) you can see this issue.
The text was updated successfully, but these errors were encountered: