Vertical Screen Movement

warpedpipe

New member
Im not sure if its possible yet in this version but ill ask anyway. I want to make something similar to Metroid where the player can explore rooms horizontally and vertically. How can I get my player to move to a screen that is above or below the current screen without dying?

Sketch3.png
 

dale_coop

Moderator
Staff member
In the "Bounds_Platform_Simple.asm" script, around line 192, you need to modify the "playerIsNotHurtForTopUpdate" subroutine, commenting out some lines, like this:
Code:
playerIsNotHurtForTopUpdate:
	
	;;;; TO USE TOP AS A BOUNDARY, UNCOMMENT THESE LINES
	;;; == TOP IS A BOUNDARY
	;; LDA #$00
	;; STA Object_v_speed_hi,x
	;; STA Object_v_speed_lo,x
	;; LDA #$02
	;; STA temp
	;; RTS
	;;;;=======END TOP IS A BOUNDARY

And the same for the bottom, around line 160, you need to modify the "doScreenottomUpdate" subroutine, commenting out two lines, like this:
Code:
doScreenBottomUpdate:	
	;;;;;;;;;;;;;;; THIS IS A PLAYER
	;;;;;;;;;;;;;;; AT THE BOTTOM OF THE SCREEN.
	;;;;;;;;;;;;;;; IF YOU WANT HIM TO GO TO THE NEXT SCREEN DOWN, LIKE MEGAMAN
	;;;;;;;;;;;;;;; COMMENT OUT EVERYTHING UNTIL changeMapScreenDown
	;;;;;;;;;;;;;;; THIS CODE WILL CAUSE PLAYER DEATH AT BOTTOM OF SCREEN
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
		;; JSR HandlePlayerDeath
		
		;; RTS

Now, your player should be able to go to the screen that is above or below the current screen without dying ;)
 
Also, if you don't want all of the "holes" you fall through to lead down to the screen below,
You can use warps, otherwise just go with Dale's solution. :)
 
Top Bottom