Skip to content

Documentation - 1 typo#179

Merged
elementbound merged 1 commit intofoxssake:mainfrom
TheYellowArchitect:patch-2
Jan 28, 2024
Merged

Documentation - 1 typo#179
elementbound merged 1 commit intofoxssake:mainfrom
TheYellowArchitect:patch-2

Conversation

@TheYellowArchitect
Copy link
Copy Markdown
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
Copy Markdown
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