-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
feature: SyncMethod [Reliable/Unreliable]: Quake Hybrid #3908
base: master
Are you sure you want to change the base?
Conversation
@@ -102,6 +103,38 @@ public struct EntityStateMessage : NetworkMessage | |||
public ArraySegment<byte> payload; | |||
} | |||
|
|||
// state update for unreliable sync. | |||
// baseline is always sent over Reliable channel. | |||
public struct EntityStateMessageUnreliableBaseline : NetworkMessage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to EntityStateMessageReliableBaseline
everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is for Unreliable SyncMethod, I think it's more obvious this way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prove it's not sent on the reliable channel and I'll agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the naming is based on SyncMethod, not on channel.
both ways are possible, but this is more obvious
public static int unreliableBaselineRate = 1; | ||
public static float unreliableBaselineInterval => unreliableBaselineRate < int.MaxValue ? 1f / unreliableBaselineRate : 0; // for 1 Hz, that's 1000ms | ||
static double lastUnreliableBaselineTime; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to ReliableBaseline everywhere
[MERGE #3907 FIRST]
credits to John Carmack for the feat that is the quake networking model.
credits to MrGadget for the hybrid idea to make it scale.