Enhanced force-resync mechanism to guarantee consistency across all players in a same room upon anyone reconnected.

This commit is contained in:
genxium
2022-12-16 18:05:18 +08:00
parent a41c68fb13
commit 8647c1a859
7 changed files with 367 additions and 306 deletions

View File

@@ -76,6 +76,7 @@ message InputsBufferSnapshot {
int32 refRenderFrameId = 1;
uint64 unconfirmedMask = 2;
repeated InputFrameDownsync toSendInputFrameDownsyncs = 3;
bool shouldForceResync = 4;
}
message MeleeBullet {
@@ -151,4 +152,5 @@ message RoomDownsyncFrame {
int64 countdownNanos = 3;
repeated MeleeBullet meleeBullets = 4; // I don't know how to mimic inheritance/composition in protobuf by far, thus using an array for each type of bullet as a compromise
uint64 backendUnconfirmedMask = 5; // Indexed by "joinIndex", same compression concern as stated in InputFrameDownsync
bool shouldForceResync = 6;
}