Releases: lomirus/bad-apple-rs
Releases · lomirus/bad-apple-rs
v1.4.0
v1.3.0 FPS Problem Fix And Other New Features
Fix
- Fixed the video length problem.
In v1.2.0, we usedthread::sleep()
to delay1000 / FPS
milliseconds after rendering each frame to control the video to play in a speed of 24 frames per second, while it also implied two problems. First, the rendering of each frame will take some time. And second, thethread::sleep()
is inaccurate therefore lots of calls ofthread::sleep()
may cause big inaccuracy. According to the test, we found that the inaccuracy finally accumulate nearly half a minute. So as to solve these questions, here we created a variable to store the start instant of the video, and check it if it elapsed enough time for rendering the next frame, else it will sleep for 10 ms and then repeat this action. And the result shows that now the inaccuracy has been reduced to under millisecond level.
Refactor
- Simplified the code logic to make it more easily understood.
Features
- Clearing the screen before playing
- Hiding the cursor when playing.
v1.2.0 Improved Release Size and Compilation Speed
(Release Mode) | v1.1.0 | v1.2.0 |
---|---|---|
Compilation Time | 340s | 30s |
Output File Size | 30.9 MB | 4.0 MB |
v1.1.0 Some Improments
- Reduced the source data size;
- Center the video automatically when it starts;
- Improved the video quality from 101x44, 20fps to 128x48, 24fps.
Bad Apple!!
Play Bad Apple!! in console [Rust Version]