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

Documentation - 1 typo #179

Merged
merged 1 commit into from
Jan 28, 2024
Merged

Documentation - 1 typo #179

merged 1 commit into from
Jan 28, 2024

Conversation

TheYellowArchitect
Copy link
Contributor

@TheYellowArchitect TheYellowArchitect commented Jan 14, 2024

Btw, the reconcilation is not crystal clear:

Since the server's state is the source of truth, the projectile's local state will be updated with the difference. This is called reconciliation.

The projectile's local state on the client who first spawned it, or the server? Also what is the difference, what is it measured in?

Btw, the reconcilation is
@elementbound
Copy link
Contributor

elementbound commented Jan 28, 2024

The projectile's local state on the client who first spawned it, or the server?

It's the client indeed. More specifically, the client that initiated the fire, since other clients just get a message to spawn projectile with given state, so they will always start with an up-to-date state. The initiating client may have a different starting state, in case the initating client and the server don't agree on where the player was when shooting for example.

Also what is the difference, what is it measured in?

It is a difference in state. The state can be anything depending on game, but usually it's position + direction for most games. However, this is completely up to the weapon implementation derived from NetworkWeapon. For example, Forest Brawl does a simple distance check based on where the initiating client has spawned the projectile, and where the server thinks the projectile should be spawned. It currently doesn't compensate for lag in this regard, so it allows for some difference in projectile spawning position to account for latency.

Thanks for the PR, merging!

@elementbound elementbound merged commit cc57a77 into foxssake:main Jan 28, 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

Successfully merging this pull request may close these issues.

2 participants