Language…
10 users online: alef,  BeeKaay, dequeiroz, gaminggiga, KaidenThelens,  MarioFanGamer, MarsAmpere, PepsiLover22, SweatyNoodle, Zavok - Guests: 59 - Bots: 381
Users: 58,856 (2,244 active)
Latest user: smokyking

Horizontal Scroll Snap Fix

SMW Patches → Horizontal Scroll Snap Fix

Submission Details

Name: Horizontal Scroll Snap Fix
Author: Kevin
Added:
Tool: Asar
Requires Free Space: Yes
Bug Fix: Yes
Featured: No
Description: This patch fixes the issue where the screen snaps immediately in the horizontal direction when the player isn't in the middle of the screen, which looks jarring and causes glitched tiles to appear on the screen. This usually happens in these cases:
- Enabling horizontal scrolling in the middle of the level, after having disabled horizontal scrolling (if the player is away from the middle of the screen).
- Changing the player's position instantly (with a big enough position change).
- Sometimes it can happen when spawning in the level, and the camera snapping on a different position on the first frame.
Instead the screen will gradually scroll to catch up to the player's position, with a speed that you can set in the asm file (recommended to keep it between $0004 and $0008), similarly to how vertical scrolling does it.
Tags: lorom sa-1 scroll
Comments: 7 (jump to comments)
Download 544 bytes | 218 downloads

Screenshots

View all

Comments (7)

TheBourgyman Link
Extremely useful patch if you play around with the camera a lot.

A little note: if for some reason you have Mario move at near his maximum possible speed (#$7F for right, #$80 for left), you want to keep the speed value for that patch at #$0008, or else Mario will outrun the screen. For most everyday uses, #$0004 or #$0005 should be OK.
 RussianMan Link
Tested With:
-Lunar Magic 3.31
-Asar 1.81
-bsnes v115
-SA-1 1.40
-GPS 1.4.3
-UberASM 1.4

Works as advertised, a pretty straightforward fix.
Pancake002 Link
Very useful patch! 👍
SJandCharlieTheCat Link
This may seem like a minor patch to some, but this is game-changing for me. Fantastic stuff -- thanks so much.
HammerBrother Link
Another method of causing this glitch to happen is simply setting the screen's position ($1A-$1D and $1462-$1465) in a way that it moves at least 16x16 block in any direction. In general, if the screen moves at such distance in one frame causes this.

The reason why this glitch occurs is because the screen has outrun the loading seam of the level. It can only load one column* of blocks per frame as the screen moves. This is by design as loading such a huge amount of blocks would vblank overflow (black bars at the top of the screen).

*Vanilla SMW's horizontal levels have the PPU register be 2x2 screen tilemap area. This is changed once you save a level on LM, which causes the tilemap to be a 2x1 screen tilemap area. When this occurs, it also loads the graphics vertically (horizontal seams as you scroll the screen up or down).
HammerBrother Link
My center scroll patch does have that if you enable !Setting_CenterScroll_GradualScroll.
 Kevin Author Link
Yeah but not everyone wants the center scroll just to fix this issue