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

Avatar spawning to be delayed to is_initial_sync_done #279

Open
TheYellowArchitect opened this issue Sep 20, 2024 · 1 comment
Open

Avatar spawning to be delayed to is_initial_sync_done #279

TheYellowArchitect opened this issue Sep 20, 2024 · 1 comment

Comments

@TheYellowArchitect
Copy link
Contributor

before-loop-message

Server starting rollback for client avatar at tick 57 starting at tick 56
Setting player name for #1651890795 to Criminal Urial
Server starting rollback for client avatar at tick 58 starting at tick 56
Server starting rollback for client avatar at tick 59 starting at tick 56
Server starting rollback for client avatar at tick 60 starting at tick 56
Server starting rollback for client avatar at tick 61 starting at tick 56
Server starting rollback for client avatar at tick 62 starting at tick 56
Server starting rollback for client avatar at tick 63 starting at tick 56
Server starting rollback for client avatar at tick 64 starting at tick 56
Server starting rollback for client avatar at tick 65 starting at tick 56
Server starting rollback for client avatar at tick 66 starting at tick 56
Server starting rollback for client avatar at tick 67 starting at tick 56
Server starting rollback for client avatar at tick 68 starting at tick 56
Server starting rollback for client avatar at tick 69 starting at tick 56
Server starting rollback for client avatar at tick 70 starting at tick 56
Server starting rollback for client avatar at tick 71 starting at tick 56
Server starting rollback for client avatar at tick 72 starting at tick 56
Server starting rollback for client avatar at tick 73 starting at tick 56
Server starting rollback for client avatar at tick 74 starting at tick 56
Server starting rollback for client avatar at tick 75 starting at tick 56
Server starting rollback for client avatar at tick 76 starting at tick 56
[DBG][netfox::NetworkTime] Client #1651890795 is now on time!

Rollback happens prematurely as seen above.

Also for my game, I use the signal NetworkTime.is_initial_sync_done (so I am certain the ticks are the same among players), and that is when I start the avatar spawns etc
This signal should be documented to be used as the "hook" for plugging netfox to any project imo

@TheYellowArchitect
Copy link
Contributor Author

TheYellowArchitect commented Sep 22, 2024

I am beginning to reconsider this entire issue, so feel free to close or at the very least, move into a discussion.

  1. The message "[DBG][netfox::NetworkTime] Client #1651890795 is now on time!" has a half ping delay.
  2. NetworkTime.is_initial_sync_done is already used, and fixed in Fix starting order for RollbackSynchronizer #284
    Personally not a fan of spawning a player, and awaiting for sync then tweaking him, instead of just straight up spawning after the sync and all good (simpler and intuitive) but race condition bugs popped up with RPCs when I tried this so no big deal I guess. But seriously, the hook for the project is required at documentation. To explain that currently, the first avatars must be spawned, and then have an is_initial_sync_done delay, and then start rollback etc.

@TheYellowArchitect TheYellowArchitect changed the title Avatar spawning must be delayed to is_initial_sync_done Avatar spawning to be delayed to is_initial_sync_done Sep 22, 2024
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

1 participant