Skip to content
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

Run-length encoded replay data #446

Open
olofson opened this issue Mar 24, 2017 · 0 comments
Open

Run-length encoded replay data #446

olofson opened this issue Mar 24, 2017 · 0 comments

Comments

@olofson
Copy link
Owner

olofson commented Mar 24, 2017

There are some issues with the current replay input log format:

  • Only 8 bits per game logic frame (that's only enough for direction + two buttons with full detection)
  • Continuously consumes one byte per game logic frame
  • Still not huge files, but it'll get worse with 100 Hz game logic.

Suggested encoding

  • Raw data: 32 bits per logic frame
  • 8 bit encoding units
  • Values 0..127 are delays
    • Insert extra delays to handle long periods with no changes
  • When the MSB is set, the remaining bits hold new data, and tell where it belongs;
    • bits 6..4 is the nibble offset
    • bits 3..0 hold the data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant