Fix glitch when going down from one screen to another in the metrovania module (4.5.9)

baardbi

Well-known member
NESmaker doesn't handle scrolling while transitioning down from one screen to another. This results in a glitch that will lock up your game. Your player will disappear and half of the screen graphics will be from another screen. The glitch looks like this:

1644569673843.png

To fix this you need to modify your doUpdateCamera.asm file. PS! Back up your file before you make any changes!

Add the following code at the top of the file, after where it says +scrollEngaged: (should be around line 20).

;;;;;;;;;;;;;;;;;;;;;;;;;; DON'T SCROLL IF THE PLAYER IS AT THE BOTTOM OF THE SCREEN

LDX player1_object
LDA Object_y_hi,x
CMP #220
BCC okScroll
JMP skipScrollUpdate
okScroll:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;

That's it! Now your game wont scroll when your player is at the bottom of the screen.
 
Top Bottom