Vertical Screen Movement

Post Reply
User avatar
warpedpipe
Posts: 5
Joined: Thu Nov 15, 2018 2:31 am

Vertical Screen Movement

Post by warpedpipe » Thu Nov 22, 2018 2:19 pm

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?

Image
User avatar
dale_coop
Posts: 1618
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Vertical Screen Movement

Post by dale_coop » Thu Nov 22, 2018 2:42 pm

In the "Bounds_Platform_Simple.asm" script, around line 192, you need to modify the "playerIsNotHurtForTopUpdate" subroutine, commenting out some lines, like this:

Code: Select all

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: Select all

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 ;)
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
User avatar
warpedpipe
Posts: 5
Joined: Thu Nov 15, 2018 2:31 am

Re: Vertical Screen Movement

Post by warpedpipe » Thu Nov 22, 2018 2:47 pm

Awesome! Thank you.
MaverickHunterZero
Posts: 6
Joined: Sun Dec 02, 2018 6:27 pm

Re: Vertical Screen Movement

Post by MaverickHunterZero » Mon Dec 03, 2018 3:33 am

Do you know where the file is located?
User avatar
dale_coop
Posts: 1618
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Vertical Screen Movement

Post by dale_coop » Mon Dec 03, 2018 7:21 am

Might be in the routines/userscripts/platform base/mainscripts folder.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
User avatar
Redherring32
Posts: 220
Joined: Sat Aug 11, 2018 2:48 pm
Location: Usa

Re: Vertical Screen Movement

Post by Redherring32 » Mon Dec 03, 2018 7:01 pm

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. :)
MaverickHunterZero
Posts: 6
Joined: Sun Dec 02, 2018 6:27 pm

Re: Vertical Screen Movement

Post by MaverickHunterZero » Mon Dec 03, 2018 10:38 pm

Nevermind
Post Reply