This code will enable horizontal or vertical autoscrolling in the level it's inserted in. Check out the asm file for customization options, such as scroll direction, speed/fractional speed and when to start and stop the autoscroll.
Note: when using horizontal autoscrolling with a high speed, Mario will die instead of being pushed by the border of the screen.
Note 2: usage of this patch is recommended to solve spawning issues when using this.
Update:
- Added horizontal autoscroll option.
- Added option to teleport when the autoscroll stops (suggested by TheMorganah).
Works as intended, so, accepted. Has some nice customization options, the vertical autoscroll has some creative potential uses in vertical levels, and the horizontal setting serves as a good alternative to the somewhat limited autoscroll sprites.
A few things which should be kept in mind:
- If you use the horizontal autoscroll, and use one of the horizontal level modes which stacks screens vertically in any way, you shouldn't set the !StopScreen number higher than that of the upper-right-most screen in the level.
- Once you reach the !StopScreen number, H-scroll will be disabled for the rest of the level, even if you re-enter that level further along than where the !StopScreen is set. This also applies to the teleport feature - re-entering the level past the !StopScreen number will instantly teleport you via the screen exit again.
- Don't use horizontal autoscrolling in a vertical level layout. You shouldn't have any reason for this in the first place, but just don't.
Follow Us On