When GGRS sends predicted input on first frame (no prev input to use), it zeroes PlayerInput and uses that.
Due to how we quantize move direction, zeroed bits did not represent no movement input, it instead was (-1.0, -1.0). This sometimes caused desync on beginning of online match.
Previously used 6 bit representation over range, was changed to quantize [0, 1.0] with 5 bits, and include a sign bit to map from [0, 1.0] -> [-1.0, 1.0]. Because range is symmetric and we quantize only half of it with one less bit, should still be same amount of precision. Now all zero bits represents 0 which is compatible with ggrs.
Additionally added debug log (not enabled by default) in networking to dump net inputs.
When GGRS sends predicted input on first frame (no prev input to use), it zeroes PlayerInput and uses that.
Due to how we quantize move direction, zeroed bits did not represent no movement input, it instead was
(-1.0, -1.0)
. This sometimes caused desync on beginning of online match.Previously used 6 bit representation over range, was changed to quantize [0, 1.0] with 5 bits, and include a sign bit to map from [0, 1.0] -> [-1.0, 1.0]. Because range is symmetric and we quantize only half of it with one less bit, should still be same amount of precision. Now all zero bits represents 0 which is compatible with ggrs.
Additionally added debug log (not enabled by default) in networking to dump net inputs.