News: 11 March 2016 - Forum Rules

Author Topic: Castlevania 1 -- Improved Controls with Improved Stairs -- Beta + Discussion  (Read 5155 times)

NaOH

  • Jr. Member
  • **
  • Posts: 36
  • Modernizing old games
    • View Profile
Do you too dream of being able to land on stairs in Castlevania 1?

I'm seeking opinions on how to implement "improved stairs" for the Castlevania Improved Controls hack. In my opinion, a big problem in CV is that it's possible to fall through stairs to one's death. In many other platformers, stairs and semi-solid platforms require a particular input (e.g. holding down or down+jump) to fall through, which I think has now become fairly standard. Players familiar with later entries in the series may also desire the behaviour seen in CV4: hold up to latch onto a stair in mid-air. Both of these options are now implemented.

Download this version of the hack (v3.0) to try it out.


Pictured: the new improved controls + improved stairs hack used with The Holy Relics.

Three options are available for the stair logic: fallthrough (in other words, no change), catch (what I think resembles most modern platformers), and latch (similar to CV4). Let me know what you think, and if you encounter any glitches. (The Holy Relics may lag a bit with this hack -- I'm working on reducing the amount of bank switching needed.)

Source code is available here if you're curious or interested in contributing or using the hack for another project. Check out the stair-catching branch.

Fun fact: the "floating" staircase in the Wicked Child level requires special code to handle, since it doesn't actually exist as a proper staircase in the ROM, and also because it ends in mid-air unlike every other staircase. (Are there any other stairs like this in the entire series..?)


Pictured: Rejoice. It is now possible to be on this particular section of staircase in stage 07-1.

(I started a similar thread for Akumajou Densetsu / CV III, but I haven't yet been able to implement the stair improvements for that game yet, mostly because to make further progress on the CV3 front I will need to switch to using a proper assembler and build system like for the CV1 hack.)
« Last Edit: June 13, 2020, 09:23:05 pm by NaOH »

PolishedTurd

  • Full Member
  • ***
  • Posts: 220
    • View Profile
I always liked a platformer that "catches" but allows you to fall through if you want, namely by holding down prior to pushing the jump button. That's how it works in Contra, right? In CV, if I want to go back to the lower level, I'm disappointed to walk all the way back down.

Would it be possible to catch the player if (for example) the player is holding up or A while descending in the air to the level of the stairs, and otherwise allow the player to fall through? That way, getting hit on the stairs adds a small danger element, forcing you to hold the "latch" button during the knockback or else fall through. And if you want to fall through while on the stairs, you can just jump straight up while not holding the latch button.  8)

Vanya

  • Hero Member
  • *****
  • Posts: 1939
    • View Profile
Contra has both kinds of platforms.
What I call solid platforms and drop-down platforms.
Most platformers have both kinds.

I really liked how SCV4 prevents you from falling off edges by "latching" you onto the stairs automatically when there's floor blocks to continue moving forward on.
That would be the single best thing to add to any CV game.

As for jumping on to and off of stairs, that's great too.

In fact I'd love both these features as a stand alone patch for CV1, 2, and 3.

NaOH

  • Jr. Member
  • **
  • Posts: 36
  • Modernizing old games
    • View Profile
I always liked a platformer that "catches" but allows you to fall through if you want, namely by holding down prior to pushing the jump button. That's how it works in Contra, right? In CV, if I want to go back to the lower level, I'm disappointed to walk all the way back down.

I think what you're describing is the "catch" approach, which is implemented already and you can download it above. In all versions of the hack it is now possible to fall through stairs by holding down and jumping.

Would it be possible to catch the player if (for example) the player is holding up or A while descending in the air to the level of the stairs, and otherwise allow the player to fall through? That way, getting hit on the stairs adds a small danger element, forcing you to hold the "latch" button during the knockback or else fall through. And if you want to fall through while on the stairs, you can just jump straight up while not holding the latch button.  8)

This is essentially the "latch" approach, although knockback currently doesn't allow the player to land on stairs (simply because I haven't implemented that yet.) Also, in CV1, getting hit on a stair causes hitstun but no knockback.

I really liked how SCV4 prevents you from falling off edges by "latching" you onto the stairs automatically when there's floor blocks to continue moving forward on.
That would be the single best thing to add to any CV game.

Actually, with the "catch" approach (which you can download above), this already happens because after walking off a cliff next to stairs, the player enters the falling state and then immediately lands on the stair. Unfortunately, this behaviour is somewhat more challenging to implement with the other approaches (latch and fallthrough). I'm not sure if I'm up to that task...

In fact I'd love both these features as a stand alone patch for CV1, 2, and 3.

I'll see if I can make a version of the patch with no air control features other than the stair changes.

Vanya

  • Hero Member
  • *****
  • Posts: 1939
    • View Profile
I'll see if I can make a version of the patch with no air control features other than the stair changes.

That'd be awesome! Much appreciated.

You mentioned before about "a proper assembler and build system like for the CV1 hack."
I wasn't aware there was such a thing for CV1.
So this is to say that there's a disassembly for CV1?

NaOH

  • Jr. Member
  • **
  • Posts: 36
  • Modernizing old games
    • View Profile
You mentioned before about "a proper assembler and build system like for the CV1 hack."
I wasn't aware there was such a thing for CV1.
So this is to say that there's a disassembly for CV1?

Oh, sorry, that's not what I meant. I put together a build system for the hack (using a modified version of asm6f which supports directives specifically to make patching random places in the ROM easier). In comparison, for Akumajou Densetsu / CV3, I was directly editing the binary file via FCEUX's inline assembler and diffing it to produce a .ips -- not the easiest system to work with. Now there's actual proper source code. :) But only for the hack itself, not for the game.
« Last Edit: June 09, 2020, 02:36:32 am by NaOH »

Vanya

  • Hero Member
  • *****
  • Posts: 1939
    • View Profile
Ah! OK, gotcha.
I'll definitely try these out asap.

NaOH

  • Jr. Member
  • **
  • Posts: 36
  • Modernizing old games
    • View Profile
As you can see, there have been no problems whatsoever getting stair landing during knockback to work correctly, everything functions precisely as intended:

Spoiler:

Vanya

  • Hero Member
  • *****
  • Posts: 1939
    • View Profile
Ha! That made me lol.

NaOH

  • Jr. Member
  • **
  • Posts: 36
  • Modernizing old games
    • View Profile
Update (v2.5): added support for knockback landing onto stairs, and support for these other romhacks:

 - Castlevania Retold
 - Castlevania: Blood Moon
 - Orchestra of Despair
 - Chorus of Mysteries
 - Castlevania: Overflow Darkness
 - Castlevania: Prelude of Darkness. (Note: landing on stairs is not available with this hack, due to a lack of space on the ROM's bank 6. It may be possible to port some code to bank 4 as with The Holy Relics in the future if there is high demand for this hack.)
 - Castlevania: Reborn

Still working my way through the list of other hacks, I'll end there for tonight.

G061

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
I would love to just be able to jump on and off the stairs freely Rondo of Blood (and Bloodlines I think?) style without the free air movement. Is that a possible thing/in the wheelhouse of your hack?

NaOH

  • Jr. Member
  • **
  • Posts: 36
  • Modernizing old games
    • View Profile
I would love to just be able to jump on and off the stairs freely Rondo of Blood (and Bloodlines I think?) style without the free air movement. Is that a possible thing/in the wheelhouse of your hack?

Well, this thread is about CV1 for the NES, not RoB or Bloodlines. Those games would require an entirely new hack. I only have experience with 6502 assembly, so I'm not sure I'd be able to make those hacks in the near future. Perhaps someday?

Vanya

  • Hero Member
  • *****
  • Posts: 1939
    • View Profile
Those games already the features of your hack, NaOH.
I think G061 is asking for the stairs features without the changed jump controls.
Which you stated earlier you would try to do in response to my comment about such a thing.

NaOH

  • Jr. Member
  • **
  • Posts: 36
  • Modernizing old games
    • View Profile
Update (V2.6):
- Vastly improved compatability with other romhacks
- Optional inertia for moving in the air. (This feature was requested.)

Update (V2.7)
- Made inertia more significant.

Those games already the features of your hack, NaOH.
I think G061 is asking for the stairs features without the changed jump controls.
Which you stated earlier you would try to do in response to my comment about such a thing.

Ohhhh, derp. Yep I completely misread.

I can't guarantee the behaviour will be identical to those games but I think it should be pretty similar yeah.
« Last Edit: June 12, 2020, 08:39:03 pm by NaOH »

Vanya

  • Hero Member
  • *****
  • Posts: 1939
    • View Profile
Just tried out v2.7.
Wow dude, cv1-controls-latch-inertia is pretty damn close to SCV4.
It's a bit "heavier" feeling than SCV4's horizontal control, but that feels better to me.
I'm very satisfied with it.

The only issue I saw was landing on the stairs after jumping straight up with the catch version.
It sort of "nudges" Simon forward causing him to step forward after every other landing.
That feels a little off.

Damn good job so far tho.

bogaabogaa

  • Full Member
  • ***
  • Posts: 234
    • View Profile
Very impressive hack and thanks for sharing and documenting your work like this. What I think so far.

I did just a short test and the controls work great so far.  :)

For the people who wonder why this might be hard to implement (stairs in CV usually get triggers on your Xpos and Ypos in the stage and end when you hit solid ground)
I ask myself if it would be a cleaner approach to figure collusion with tiles and make a collusion event for stairs. This kind of hack has also potential to create different events for tile collusion for other hackers. It could also be easier to follow the code then to wrap the head around the original stairs.

I made a source of CV here so I could place code better into the ROM. This assembly is made for ASM6 https://github.com/bogaa/CastlevaniaPRG1/tree/master/CastlevaniaPRG1

   1. Downside I am not sure anymore if I am allowed to share this.
   2. You can't patch a ROM with it.
    Practically it makes it good to move things around but this project is undocumented. I did convert that one to a MMC5 with
    CHR and added a bunch CHR bank swapping for animation and currently stuck at modding controls. When I get that hack to a
    finished state I had like to release it with the source code..

There is a ASM patcher called xkas-plus (v14+1) that just allows you to patch a ROM with assembly.
I did reverse engineer your old patch just to later find out that you wrote and shared code on git.. then I had to steal your documentation since I made much more sense then what I did come up with. Here the patch ASM. https://www.dropbox.com/s/qizoybvs75ykkhk/Controlls.asm?dl=0

This file can be added to my Test Hack Code folder I did release here. Just add the patch to the Main.asm as the other files are.

I had like to ask if you are ok when I share/credit that patch too since I feel like that xkas may make it easy for some to modify the code to there needs.

This brings up the question if you also like to share a fork of ASM6F that will allow to patch existing ROMs? I would be exited about it.  :D 

Here a preview. This is a single frame sprite with a 8 frame animation thanks to CHR bankswapping. (And sorry for sidetracking from the topic a bit).. I did feel it might be intressting..
CV ROM DiscordServer
https://discord.gg/PvFgxRg

NaOH

  • Jr. Member
  • **
  • Posts: 36
  • Modernizing old games
    • View Profile
The only issue I saw was landing on the stairs after jumping straight up with the catch version.
It sort of "nudges" Simon forward causing him to step forward after every other landing.
That feels a little off.

Update (v2.8): fixed this particular issue ^.

Unfortunately the game does require that Simon not stop halfway up a step, so if landing halfway between a step on a stair he has to finish the step. But jumping and landing again after that will no longer cause another step.

I ask myself if it would be a cleaner approach to figure collusion with tiles and make a collusion event for stairs. This kind of hack has also potential to create different events for tile collusion for other hackers. It could also be easier to follow the code then to wrap the head around the original stairs.

I'm not sure I fully understand what you mean. Could you please elaborate?

I made a source of CV here so I could place code better into the ROM. This assembly is made for ASM6 https://github.com/bogaa/CastlevaniaPRG1/tree/master/CastlevaniaPRG1

   1. Downside I am not sure anymore if I am allowed to share this.

Why isn't there a disassembly "patch" format which requires the original ROM to view? That could be really helpful for legal reasons in situations like this. :-\

There is a ASM patcher called xkas-plus (v14+1) that just allows you to patch a ROM with assembly.

Ahhh! I wish I knew about this! I did some research and asked around about this but never came across xkas-plus. If I had known about this, I probably wouldn't have gone and edited asm6f to achieve basically the same thing.

I did reverse engineer your old patch just to later find out that you wrote and shared code on git.. then I had to steal your documentation since I made much more sense then what I did come up with. Here the patch ASM. https://www.dropbox.com/s/qizoybvs75ykkhk/Controlls.asm?dl=0

Wow... it's super interesting seeing my own code redocumented by someone else. Thanks for sharing.

This file can be added to my Test Hack Code folder I did release here. Just add the patch to the Main.asm as the other files are.

What "Test Hack Code" are you talking about?

I had like to ask if you are ok when I share/credit that patch too since I feel like that xkas may make it easy for some to modify the code to there needs.

Sure, go for it, but please link to the original source on github.


This brings up the question if you also like to share a fork of ASM6F that will allow to patch existing ROMs? I would be exited about it.  :D 

Indeed, here it is!

Here a preview. This is a single frame sprite with a 8 frame animation thanks to CHR bankswapping. (And sorry for sidetracking from the topic a bit).. I did feel it might be intressting..

No worries! It is very interesting indeed. And that hack pictured is very impressive. The fire animation is lovely.
« Last Edit: June 13, 2020, 03:22:44 pm by NaOH »

bogaabogaa

  • Full Member
  • ***
  • Posts: 234
    • View Profile

1. I'm not sure I fully understand what you mean. Could you please elaborate?


2. What "Test Hack Code" are you talking about?

1. In RAM around $640-$6ff is the table that checks for solid ground. Really not sure if it would be easier to add stairs as a collusion block. It was a idea I did think it might be worth looking into. But you did the whole thing already so it is to late..



2. I talk about this hack I made recently. I shared the code with the patch. Everything is included so you can drop the asm I shared in there and patch the rom from the asm file when you add it in the main asm file. http://www.romhacking.net/hacks/5180/

Thanks for the quick respond and your work.
CV ROM DiscordServer
https://discord.gg/PvFgxRg

ZeldaTheSwordsman

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Does this do anything about stairs that go between screens, to make it so that getting knocked down one of those just sends you back to the previous screen instead of the short stair climb magically becoming a death pit?

There's one staircase in Block 2 that's particularly bad about that.