"One way" Castlevania-style jumping?

Rancor

New member
I heard mention here and there about people working on scripts to make a castlevania-style jumping script, but I've yet to see anyone post their versions. Anyone willing to share with the class? :D

How exactly would it work? Does the jumping script provided by the platform module allow the player to change direction (and velocity) in mid-air, or would the basic movement script need to be modified instead to make jumps more rigid (maybe with a check for whether the player is in air)?
I think ideally I'd want to make a jumping script that makes it so that you can change direction in mid air, but not velocity/acceleration (that way you can use enemies for damage-boosting via knockback in a speedrun-style scenario)

I was going to post this in the help section as I have little to contribute to the subject, but it seems that board is mostly for big errors or other nasty snags, rather than being stumped on how to do a specific thing in ASM.
Apologies if I've posted this in the wrong section.

EDIT: Just so I don't come here with my hands cupped waiting for a script, I tried my earlier idea of modifying the movement scripts, although my results are minimal.
Basically, I added the same check used for the jumping script to the movement scripts and as a result, my character can no longer move in mid-air when jumping stationary, however I am having trouble when jumping right/left
The code looks like this:

StartMovingPlayerRight.asm:
Code:
LDX player1_object
LDA Object_status,x
AND #%00000100
BEQ +
    StartMoving player1_object, MOVE_RIGHT
        LDA Object_movement,x
        ORA #%00000010
    STA Object_movement,x
    ;;;        000 down
    ;;;        001 down right
    ;;;        010 right
    ;;;        011 up right
    ;;;        100 up
    ;;;        101 up left
    ;;;        110 left
    ;;;        111 down left
    +
    RTS

StartMovingPlayerLeft.asm:
Code:
LDX player1_object
LDA Object_status,x
AND #%00000100
BEQ +
    StartMoving player1_object, MOVE_LEFT
        LDA Object_movement,x
        ORA #%00000110
    STA Object_movement,x
    ;;;        000 down
    ;;;        001 down right
    ;;;        010 right
    ;;;        011 up right
    ;;;        100 up
    ;;;        101 up left
    ;;;        110 left
    ;;;        111 down left
    +
    RTS

So, stationary jumping now works like I wanted it to, but I still have the issue that in mid-jump when moving, I can let go of the direction to cut the jump short.
 

dale_coop

Moderator
Staff member
You right, having different kind of jump scripts would be very great!
I don't have time to digg in those scripts recently (not often at home... not a lot of free time... nights are shorts...)
And, like a lot of persons, here, I am mainly waiting for the 4.1. So not a lot of scripts are made/customized recently.

But when the 4.1 will be out, more time will be spent in scripts/projects/customizations.
 

Rancor

New member
Thanks for the reply!

I wasn't aware 4.1 was so close that people would be waiting for it specifically to do work. I guess I'll wait for it myself in that case. I did take a look at the preview that was released around thanksgiving - Looks very promising! Hopefully it will bring more action-adventure oriented people with all the know-how on jumping good and swinging swords or whips or whatever.

To keep on topic, I also tried changing the "StopMovingPlayer" scripts so that they checked for whether the player was in the air. I was hoping this would work (and logically it sounds pretty sound, right? I'm not crazy, am I?) , but as far as I can tell the changes I made do absolutely nothing. No idea why. Maybe if I were more familiar I could figure it out. Oh well.

I mean, in theory, if the script checks to see if the player is in the air and skips the rest if they are, the player should keep moving using the previous direction+velocity even if the directional button is released, no? Maybe I'm not doing conditionals right.
I should also mention I've tried removing the first "rts" and leaving only the "RTS" after the label "+" but it didn't change anything, either.

StopMovingPlayerRight.asm:

Code:
LDX player1_object
LDA Object_status,x
AND #%00000100
BEQ +
    StopMoving player1_object, STOP_RIGHT
    rts
    +
    RTS


StopMovingPlayerLeft.asm:

Code:
LDX player1_object
LDA Object_status,x
AND #%00000100
BEQ +
    StopMoving player1_object, STOP_LEFT
    rts
    +
    RTS

Just to reiterate I'm trying to make it so that while the player is in the air, they will not be able to move. Either they jump up, right, or left. No turning back - makes the jumps matter more!
I thought about doing something like using a script similar to when the player is hit in the platform module (which I think would solve this problem) but I also want the player to be able to attack while in air.
 

dale_coop

Moderator
Staff member
Yeah, your idea was good... but in reality, the gamepad (pressed directions/buttons) is checked in the physics engine as well, in some situations (take a look at the Physics_Plateforme_Simple.asm script and search for "gamepad")

I know that in 4.1, Joe (the NESMaker creator) did a lot of changes on the engine... So maybe all that will be different.
The 4.1 will be out soon, yeah, maybe next week... or for XMas. Follow the everyday news on the NESMaker group facebook page: https://www.facebook.com/groups/NESmakers/
 

Rancor

New member
Well, good to know I was half right and not wholly wrong.

I might just go poking around the Physics_Platform_Simple.asm, but I'm not confident I'll be able to make much sense of it given my limited understanding. Still, if anything comes up, I'll be sure to leave it here in case it becomes useful to someone else.
If I can't get anything working now, there's at least 4.1's release to look forward to. I'll keep a tab on that facebook group you recommended.

I still have plenty of other, creative stuff to do to fill my time either way - not that coding doesn't require creativity.
 

dale_coop

Moderator
Staff member
Oracle said:
If I can't get anything working now, there's at least 4.1's release to look forward to. I'll keep a tab on that facebook group you recommended.
I still have plenty of other, creative stuff to do to fill my time either way - not that coding doesn't require creativity.

Yeah, look at the today video: https://www.facebook.com/JoeGranatoIV/videos/1525294834282106/
the 4.1 is looking great.
In the mean time just chill out, follow the tutorials, try some stuff (as you're doing! good job! you're doing well... test/try...break!) and or make your assets/sprites to be used with the 4.1.
 
Top Bottom