Further simplified proto communication.

This commit is contained in:
genxium
2023-01-02 20:42:23 +08:00
parent bd870e4059
commit 69581009ee
12 changed files with 859 additions and 1465 deletions

View File

@@ -15,7 +15,7 @@ message PlayerDownsync {
int32 speed = 8; // this is the instantaneous scalar attribute of a character, different from but will be accounted in "velX" and "velY"
int32 battleState = 9;
int32 joinIndex = 10;
double colliderRadius = 11;
int32 colliderRadius = 11;
bool removed = 12;
int32 score = 13;
int32 lastMoveGmtMillis = 14;
@@ -25,6 +25,8 @@ message PlayerDownsync {
int32 characterState = 18;
bool inAir = 19; // by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "inAir (prev -> curr)"
int32 framesInChState = 20; // number of frames elapsed in the current character state
int32 activeSkillId = 21;
int32 activeSkillHit = 22;
string name = 997;
string displayName = 998;
@@ -85,33 +87,29 @@ message MeleeBullet {
// ALL lengths are in world coordinate
// for offender
int32 battleLocalId = 1;
int32 startupFrames = 2;
int32 activeFrames = 3;
int32 recoveryFrames = 4;
int32 recoveryFramesOnBlock = 5;
int32 recoveryFramesOnHit = 6;
double hitboxOffset = 7;
int32 originatedRenderFrameId = 8;
int32 originatedRenderFrameId = 1;
int32 offenderJoinIndex = 2;
// for defender
int32 hitStunFrames = 9;
int32 blockStunFrames = 10;
double pushbackX = 11;
double pushbackY = 12;
int32 startupFrames = 3;
int32 cancellableStFrame = 4;
int32 cancellableEdFrame = 5;
int32 activeFrames = 6;
int32 damage = 13;
int32 hitStunFrames = 7;
int32 blockStunFrames = 8;
int32 pushbackVelX = 9;
int32 pushbackVelY = 10;
int32 damage = 11;
int32 offenderJoinIndex = 14;
int32 offenderPlayerId = 15;
int32 selfLockVelX = 12;
int32 selfLockVelY = 13;
double hitboxSizeX = 16;
double hitboxSizeY = 17;
int32 hitboxOffsetX = 14;
int32 hitboxOffsetY = 15;
int32 hitboxSizeX = 16;
int32 hitboxSizeY = 17;
double selfLockVelX = 18;
double selfLockVelY = 19;
int32 releaseTriggerType = 999; // 1: rising-edge, 2: falling-edge
bool blowUp = 18;
}
message BattleColliderInfo {
@@ -127,8 +125,8 @@ message BattleColliderInfo {
int64 rollbackEstimatedDtNanos = 9;
int32 renderCacheSize = 10;
int32 spaceOffsetX = 11;
int32 spaceOffsetY = 12;
double spaceOffsetX = 11;
double spaceOffsetY = 12;
int32 collisionMinStep = 13;
bool frameDataLoggingEnabled = 999;
@@ -141,5 +139,4 @@ message RoomDownsyncFrame {
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;
map<int32, int32> playerOpPatternToSkillId = 7;
}