overbound / SonicTimeTwisted2.0

5 stars 0 forks source link

Drop Dash implementation #36

Closed jtn00b closed 8 months ago

jtn00b commented 8 months ago

This PR adds in the Drop Dash as a new ability exclusive to Sonic.

jtn00b commented 8 months ago

Still needs cleanup. Sonic doesn't a specific spinning animation for this ability yet, but other than that, the ability should work well

jtn00b commented 8 months ago

https://github.com/overbound/SonicTimeTwisted2.0/assets/86170881/e6d68a9e-45b1-494e-8728-2c42849ed7e2

With the proper sprites added, this ability would be fully completed. All that's left is to map it to pressing down twice, and add an option to choose between both input methods.

VectorSatyr commented 8 months ago

@AlexKhayrullin Please add an option to enable drop dash, when you can.

AlexKhayrullin commented 8 months ago

@VectorSatyr @jtn00b

Can we agree on the options to add before I do? Because jtn00b refers to selecting an input method, VectorSatyr asks to enable/disable...

Which one should I add? Or should I add both?

overbound commented 8 months ago

@VectorSatyr @jtn00b

Can we agree on the options to add before I do? Because jtn00b refers to selecting an input method, VectorSatyr asks to enable/disable...

Which one should I add? Or should I add both?

Options should be: Insta-Shield Only Drop Dash Only Insta-Shield + Drop Dash (Press Down Twice for Drop Dash) Insta-Shield + Drop Dash (Hold Jump for Drop Dash)

I would like to create a screen where by you are asked to choose between the options when you start a new game. But that can be a separate issue.

AlexKhayrullin commented 8 months ago

@overbound

I would like to create a screen where by you are asked to choose between the options when you start a new game. But that can be a separate issue.

So this will be an option that is tied to the save file and not saved with other, global, options, right? Because, yeah, that's a whole different beast than just adding an item to the options menu.

overbound commented 8 months ago

spindrop_time_twist @jtn00b DD Sprite ^^

overbound commented 8 months ago

@AlexKhayrullin

I would like to create a screen where by you are asked to choose between the options when you start a new game. But that can be a separate issue.

So this will be an option that is tied to the save file and not saved with other, global, options, right? Because, yeah, that's a whole different beast than just adding an item to the options menu.

No. It should just be a global option. I just think when you start a new game is a good point to present the question. In addition to having the option in the options menu.

It might be worth noting that I want to have a splash screen too where it explains that Big Rings are Near Time Travel points, when you start a new game too. So a Generic Menu space should be added between the start new game press and the game actually starting.

AlexKhayrullin commented 8 months ago

@overbound

OK :) . I this case, I think we can follow what you said and make this new screen a separate ticket ;)

For the sake of clarity and available space (especially in other languages), I suggest adding the requested options as two items:

Last question: I don't know how the handling of these options is or will be implemented, but if it's too much of a hassle to change the control scheme on the fly (for instance, if the options are read on room start and that's it), I can make it so they only appear in the main menu (on the title screen), but not in the pause menu, like I already do for the "Warnings & Disclaimers" button. Should I?

jtn00b commented 8 months ago

spindrop_time_twist @jtn00b DD Sprite ^^

@overbound That's the one by Clone isn't it? To be completely honest, this sprite looks quite crude. It's missing the squash and stretch effect that emphasizes on how sonic is ready to launch, and overall it's really lacking. I recall Clone himself said it looked lazy and he would change it? I can still use this, but I'd rather wait for a more complete sprite before merging, with all honesty. No offense, of course 😅

jtn00b commented 8 months ago

ezgif com-speed drpdsh

My attempt at a drop dash sprite. And here's how it looks like in-game:

https://github.com/overbound/SonicTimeTwisted2.0/assets/86170881/6ce3fdda-bf18-40a3-bd6f-51cef0b0c522

What are your thoughts?

AlexKhayrullin commented 8 months ago

@jtn00b To make my work easier (and especially to alleviate any risk of me messing up your code), can you please add a variable to objPlayer that controls how Sonic's special moves are triggered? Leave its value hardcoded on your end, what's where my menu with the new options comes into play.

Basically the variable should control the insta-shield and the drop dash depending on its value. Something like:

special_move_mode = 0; // insta-shield only
special_move_mode = 1; // drop dash only
special_move_mode = 2; // both, drop dash triggered by holding jump
special_move_mode = 3; // both, drop dash trggered by pressing down twice

(I leave its name kinda generic so that we can use it with other characters, the much-requested Amy comes to mind)

jtn00b commented 8 months ago

@AlexKhayrullin

@jtn00b To make my work easier (and especially to alleviate any risk of me messing up your code), can you please add a variable to objPlayer that controls how Sonic's special moves are triggered? Leave its value hardcoded on your end, what's where my menu with the new options comes into play.

Basically the variable should control the insta-shield and the drop dash depending on its value. Something like:

special_move_mode = 0; // insta-shield only
special_move_mode = 1; // drop dash only
special_move_mode = 2; // both, drop dash triggered by holding jump
special_move_mode = 3; // both, drop dash trggered by pressing down twice

(I leave its name kinda generic so that we can use it with other characters, the much-requested Amy comes to mind)

Sure, I can do that. But theoretically, wouldn't Amy need another separate variable so her settings don't get overwritten by Sonic's?

AlexKhayrullin commented 8 months ago

No, don't worry, I'll take care to fill in the correct value depending on the character.

On your end, you'll either have to restrict the use of the variable to character-specific scripts (which seems to be the case, unless I missed something?) or use it jointly with an if() that determines whether the player plays as Sonic (I can't bring up the exact condition, I'm at work right now, but you know what I mean).

jtn00b commented 8 months ago

The next step is to find a way to make the drop dash and the insta-shield work simultaneously. It's gonna be quite a challenge because they both depend on the jump_action variable to activate. If either one of them gets triggered, the other becomes inaccessible. Also, how is double tapping down supposed to trigger the drop dash? Do you hold down on the second input to charge? Or do you just double tap and it instantly gets charged?

overbound commented 8 months ago

@jtn00b double tap would instantly charge.

jtn00b commented 8 months ago

https://github.com/overbound/SonicTimeTwisted2.0/assets/86170881/f1661562-ab87-41ba-b844-8873cac51261

Finally added the special_move_mode variable and made changes to the code accordingly. Also, I just realized that the drop dash may not even need jump_action to be activated after all... Now that both abilities can work simultaneously, there's only the alternate input for the drop dash that's left to code. But other than that, any other mode should be working. And finally, as the latest commit has been pushed, for now you can only change special_move_mode's value by going through objPlayer's create event. Maybe now @AlexKhayrullin can work on the menu?

AlexKhayrullin commented 8 months ago

This should do it. I'm keeping labels generic, because if Amy becomes a thing, we'll most probably use the same menu, no?

image image image

My only concern is that I couldn't get the "press down twice" control scheme to work on my end...

overbound commented 8 months ago

@AlexKhayrullin I added the drop dash by pressing down twice. Basically you have 30 steps to press it.

jtn00b commented 8 months ago

Great job everyone. Should we start a review so that the branch can merge?

jtn00b commented 8 months ago

@overbound While I was fixing problems from your latest commit, I found out that the drop dash (under the press down twice control scheme) can be cancelled after pressing AND releasing jump midair. I didn't really think this one through, so should we keep it that way?

overbound commented 8 months ago

@jtn00b what did I break? I don't think having Jump button cancel the drop dash is good.

jtn00b commented 8 months ago

@jtn00b what did I break?

@overbound When you have both the insta-shield and the drop dash (activated by holding jump), the latter could only be activated by pressing down twice. When you had the drop dash's other control scheme selected, it wouldn't work at all.

I don't think having Jump button cancel the drop dash is good.

Okay. But that begs the question, should there be any way to cancel the drop dash at all? Pressing down twice again would be kind of unintuitive.

And lastly, your commit aside, I've found a handful of issues too, like how the drop dash is somewhat still active when you use the flippers in AAZ, even if Sonic's spinning animation gets reset. The drop dash still needs more testing, as I'm not quite sure about how it would respond to other gimmicks in the other zones.

overbound commented 8 months ago

Sounds like we need a test build.

Also I don't think the drop dash needs to be cancelable. It isn't in any of the official games right?

jtn00b commented 8 months ago

Sounds like we need a test build.

Also I don't think the drop dash needs to be cancelable. It isn't in any of the official games right?

@overbound In the official games, you can cancel it by releasing the jump button before hitting the ground. That's also what's been added to Time Twisted.

overbound commented 8 months ago

I suppose what would make the most sense is having UP cancel the Drop Dash in that case.

jtn00b commented 8 months ago

That should do it. At least, there shouldn't be any more problems with the drop dash or whatsoever. Now I'd say there's nothing left to do for this PR. Just make a build for more testing and fix more glitches if they are found. Then we can merge.

overbound commented 8 months ago

@jtn00b I notice I cannot perform a drop dash when I spindash off a launch pad into the air.

overbound commented 8 months ago

Okay I checked Mania, that's how the drop dash is in Mania too. This is dumb AF.

jtn00b commented 8 months ago

@overbound Yeah, I made it accurate to Mania, so the only way to make the move accessible is by jumping. Made it this way to avoid causing more issues in certain situations while interacting with gimmicks. What do you suggest then?

overbound commented 8 months ago

@jtn00b I'll mess with it tonight some more. Want to try it myself.

overbound commented 8 months ago

I've updated the drop dash to work with shields when you press down twice.

I've also updated the drop dash to work when spinning into the air, instead of just jumping.

overbound commented 8 months ago

One last thing I want to change is I think the drop dash should work after a shield move for the press down twice or pressing jump options. I don't think it will cause any major issues.

If you want to make this change @jtn00b go for it. Otherwise I'll find time tomorrow or something.

overbound commented 8 months ago

In order to get press and hold working with the drop dash I have to make a couple of sacrifices/changes.

  1. The Jump height on every character has been increased and now matches Mania.
  2. The speed of the bound of the bubble shield dropped from 8 to 6.5.
  3. It now only takes 14 frames to charge the drop dash instead of 20.

@jtn00b @AlexKhayrullin I believe this is it! The Drop Dash is finished. Please test a little bit more or I will tomorrow.

overbound commented 8 months ago

https://github.com/overbound/SonicTimeTwisted2.0/assets/32524065/a8654add-eab6-410d-9746-ad4c0e6c92b4

overbound commented 8 months ago

Well there is one more change I want to make to the Wind Shield. Will do it in the morning.

jtn00b commented 8 months ago

Gonna find the time to test it out.

overbound commented 8 months ago

@jtn00b I made one last change. I consider this feature complete now. Let me know how your testing goes.

overbound commented 8 months ago

Okay I updated the graphics for the drop dash and spin dash to have consistent sprites.

overbound commented 8 months ago

Also I forgot that for some reason the game keeps the camera in Air mode so we need to change that.

overbound commented 8 months ago

Updated the Camera to ground mode. FINALLY WE ARE DONE DONE!!!!!

jtn00b commented 8 months ago

I gotta say, this feels so nice to use. Nice job overbound! No issues or bugs so far on my end. Maybe make a final development build before merging?

BlueSpeedsterYT commented 8 months ago

Right so this should be ready to merge into the main branch, provided there is no issues ahead