Jump Script Fix - aka - I believe I can (stop) fly(ing)

User avatar
WolfMerrik
Posts: 199
Joined: Sat Aug 11, 2018 4:59 pm
Location: Maine
Contact:

Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by WolfMerrik » Fri Aug 31, 2018 4:41 am

As mentioned on the comments in the YouTube video, mashing the button seems to let you fly...
I am not sure if this is the best fix, but it does indeed work:

This script would change varJumpRelease.asm

Code: Select all

LDA #$00			; Its always good to start at 0
SEC
SBC #$02			; I chose 2 over the tutorials 3 because I wanted lighter/tighter jumps
LDX player1_object
CMP Object_v_speed_hi,x		; Rather than BPL, we will compare with the current player value
BMI skipVarJump			; If the speed is below the jumping (reverse falling speed)
LDA #$00			; the same fun way to set the values as the original lol.
SEC
SBC #$02			; This should be the same as we compare against above

STA Object_v_speed_hi,x
skipVarJump:
RTS
Definitely feel free to improve this!
Last edited by WolfMerrik on Fri Aug 31, 2018 5:17 am, edited 1 time in total.
ImageWant to download & share Image NESMaker Resources? Check out My Files on www.NESMakerFiles.com Image
User avatar
CutterCross
Posts: 271
Joined: Sat Apr 28, 2018 9:42 pm

Re: Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by CutterCross » Fri Aug 31, 2018 4:59 am

WolfMerrik wrote:
Fri Aug 31, 2018 4:41 am
As mentioned on the comments in the YouTube video, mashing the button seems to let you fly...
I am not sure if this is the best fix, but it does indeed work:

Code: Select all

LDA #$00			; Its always good to start at 0
SEC
SBC #$02			; I chose 2 over the tutorials 3 because I wanted lighter/tighter jumps
LDX player1_object
CMP Object_v_speed_hi,x		; Rather than BPL, we will compare with the current player value
BMI skipVarJump			; If the speed is below the jumping (reverse falling speed)
LDA #$00			; the same fun way to set the values as the original lol.
SEC
SBC #$02			; This should be the same as we compare against above

STA Object_v_speed_hi,x
skipVarJump:
RTS
Definitely feel free to improve this!
For some reason it won't work on my end. Getting errors about a label already being defined. (I'm probably missing something though.)
The Tower of Turmoil: viewtopic.php?f=12&t=1348
User avatar
WolfMerrik
Posts: 199
Joined: Sat Aug 11, 2018 4:59 pm
Location: Maine
Contact:

Re: Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by WolfMerrik » Fri Aug 31, 2018 5:03 am

Do you have this script as well as the other both being used by any chance?
Otherwise I am not sure.
ImageWant to download & share Image NESMaker Resources? Check out My Files on www.NESMakerFiles.com Image
User avatar
CutterCross
Posts: 271
Joined: Sat Apr 28, 2018 9:42 pm

Re: Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by CutterCross » Fri Aug 31, 2018 5:05 am

WolfMerrik wrote:
Fri Aug 31, 2018 5:03 am
Do you have this script as well as the other both being used by any chance?
Otherwise I am not sure.
I replaced the old jump script with this one, but I'm also using the varJumpRelease script if that helps narrow it down.
The Tower of Turmoil: viewtopic.php?f=12&t=1348
User avatar
WolfMerrik
Posts: 199
Joined: Sat Aug 11, 2018 4:59 pm
Location: Maine
Contact:

Re: Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by WolfMerrik » Fri Aug 31, 2018 5:17 am

CutterCross wrote:
Fri Aug 31, 2018 5:05 am
I replaced the old jump script with this one, but I'm also using the varJumpRelease script if that helps narrow it down.
This script is for the jump release - so the one I posted should replace "varJumpRelease.asm"
I changed the post to make that more clear
ImageWant to download & share Image NESMaker Resources? Check out My Files on www.NESMakerFiles.com Image
User avatar
CutterCross
Posts: 271
Joined: Sat Apr 28, 2018 9:42 pm

Re: Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by CutterCross » Fri Aug 31, 2018 5:20 am

WolfMerrik wrote:
Fri Aug 31, 2018 5:17 am
This script is for the jump release - so the one I posted should replace "varJumpRelease.asm"
I changed the post to make that more clear
Oh haha, oops. That was my bad.

I replaced the varJumpRelease with this script and now it works perfectly!
The Tower of Turmoil: viewtopic.php?f=12&t=1348
User avatar
WolfMerrik
Posts: 199
Joined: Sat Aug 11, 2018 4:59 pm
Location: Maine
Contact:

Re: Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by WolfMerrik » Fri Aug 31, 2018 5:23 am

I should have said which life it modified, equal parts "our bad" haha.

That's great it's working!
I'm sure it is pretty crappy ASM, as I am VERY new to understanding it, but it does at least fix that glitch.
ImageWant to download & share Image NESMaker Resources? Check out My Files on www.NESMakerFiles.com Image
User avatar
CutterCross
Posts: 271
Joined: Sat Apr 28, 2018 9:42 pm

Re: Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by CutterCross » Fri Aug 31, 2018 5:25 am

WolfMerrik wrote:
Fri Aug 31, 2018 5:23 am
I should have said which life it modified, equal parts "our bad" haha.

That's great it's working!
I'm sure it is pretty crappy ASM, as I am VERY new to understanding it, but it does at least fix that glitch.
Well if it works without issues it's not crappy to me! Haha

I need to start diving into ASM myself too.
The Tower of Turmoil: viewtopic.php?f=12&t=1348
User avatar
ostincoolston
Posts: 40
Joined: Sun Apr 22, 2018 11:21 am

Re: Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by ostincoolston » Fri Aug 31, 2018 9:39 am

Code: Select all

LDX player1_object
LDA Object_v_speed_hi,x
BPL skipVarJump
LDA #$00
SEC



STA Object_v_speed_hi,x
skipVarJump:
RTS
I just did this, I removed the part where it subtracts a number from the that loaded number...I think? You don't get that floaty feel when you fall with it, You fall quite fast but I haven't noticed any weird double jump effect or extra height from it.
User avatar
WolfMerrik
Posts: 199
Joined: Sat Aug 11, 2018 4:59 pm
Location: Maine
Contact:

Re: Jump Script Fix - aka - I believe I can (stop) fly(ing)

Post by WolfMerrik » Fri Aug 31, 2018 12:36 pm

ostincoolston wrote:
Fri Aug 31, 2018 9:39 am
I just did this, I removed the part where it subtracts a number from the that loaded number...I think? You don't get that floaty feel when you fall with it, You fall quite fast but I haven't noticed any weird double jump effect or extra height from it.
That would definitely work too, but I still wanted there to be a bit of an extra lift after releasing the jump button, so you didn't stop immediately.
In your script, I think you can remove the set carry "SEC" line as well if you want it to just stop.
ImageWant to download & share Image NESMaker Resources? Check out My Files on www.NESMakerFiles.com Image
Post Reply