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

Rework rollback tick callbacks #35

Closed
elementbound opened this issue Oct 31, 2023 · 1 comment · Fixed by #36
Closed

Rework rollback tick callbacks #35

elementbound opened this issue Oct 31, 2023 · 1 comment · Fixed by #36

Comments

@elementbound
Copy link
Contributor

elementbound commented Oct 31, 2023

Background

Regardless of type, tick callbacks are usually called _tick, which can make code more confusing, both to write, read, and to auto-register rollback handlers in RollbackSynchronizer.

Done criteria

  1. Rollback tick callback method name is configurable
    1. Defaults to _rollback_tick
  2. Code is updated to use new callback name
  3. Rollback callback receives an is_fresh flag
    1. True when this is the first time the object simulates the given tick
    2. Can be used for spawning effects, playing sound, etc.
@elementbound
Copy link
Contributor Author

Removed configurable rollback method name - while it would be cool, I'm too concerned about performance.

elementbound added a commit that referenced this issue Nov 1, 2023
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

Successfully merging a pull request may close this issue.

1 participant