You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because game runs at 10fps and scroll speed is set to 10% that means for each of the 6 displayed frames of a game frame the screen scrolls at 6 different rates.
In other words, lets say the screen needs to scroll 32 pixels (one tile)
It might scroll 32 * 0.1 pixels on frame 1 or 3.2px to position 3.2
Then it would scroll 28.8 * 0.1 pixels on frame 2 to 6.08
Then it would scroll 25.92 * 0.1 pixels on frame 3 to 8.672
As you can see each frame is slower but then jumps up when the player moves further
At frame 6 a game frame ticks and now it's target is 64 pixels.
This stutter is noticeable.
A simple solution is probably just a max velocity of tilesSize / frameRate
The text was updated successfully, but these errors were encountered:
Because game runs at 10fps and scroll speed is set to 10% that means for each of the 6 displayed frames of a game frame the screen scrolls at 6 different rates.
In other words, lets say the screen needs to scroll 32 pixels (one tile)
It might scroll 32 * 0.1 pixels on frame 1 or 3.2px to position 3.2
Then it would scroll 28.8 * 0.1 pixels on frame 2 to 6.08
Then it would scroll 25.92 * 0.1 pixels on frame 3 to 8.672
As you can see each frame is slower but then jumps up when the player moves further
At frame 6 a game frame ticks and now it's target is 64 pixels.
This stutter is noticeable.
A simple solution is probably just a max velocity of tilesSize / frameRate
The text was updated successfully, but these errors were encountered: