Changes

Jump to: navigation, search

Cv1/ScrollGlitch

1 byte added, 22:12, 11 August 2022
no edit summary
=== How non-glitched walking normally works ===
A player usually just walks in one direction for a while. As they walk through a new Column Update Window, the column 1.5 screens away starts getting updated. The Column Update Window is 32 pixels wide and we update tiles every other pixel, so we will run the tile upgrading algorithm 16 times (32/2). This will cause the block counter to go from 0 -> 7 and then 0 -> 7 again. This updates every tile value twice. Updating it twice doesn’t cause any harm - it just puts the same value there.
 
''NOTE - Technically there is a 50% probability of it being 15 times, not 16. This is because the first value is always overridden to 0. If that happens on the tile updating frame, the counter will still be held at 0. ''
=== What causes the scroll glitch to happen? ===
If the block counter is only updated every other frame, it seems impossible to actually make the trick predictable. Luckily, there is a neat math trick that solves this. This is best explained with an example:
''NOTE - Technically there is a 50% probability of it being 15 times, not 16. This is because the first value is always overridden to 0. If that happens on the tile updating frame, the counter will still be held at 0. ''
If you move 1 frame, did you move the block counter? You don’t know. There is a 50% probability you did. If you move 2 frames, did you move the block counter? You moved the counter one and only one time with 100% certainty. This is because you either updated on the first frame or the second frame. It can’t be both or neither!
2
edits

Navigation menu