Crossy Road/Mario 64 Triple Jump Mechanic Help

Godot Version 4.3

Question

I am trying to create a mechanic that combines grid-based movement elements from the mobile game crossy road and the triple jump from super Mario 64.

Crossy Road has a grid-based movement system where each tap will move the character one grid space forward (shown in GIF link below)

Mario 64 had a triple jump mechanic where if you timed the input just as Mario touched the ground your next jump would be higher and longer (shown in GIF link below)

What I am trying to do is make it so that if a player times their jump just as the character lands on the next grid, they will then move 2 grids on their next jump and 3 grids if they time the next one after that. Each jump has its own animation/movement speed.

I am currently trying to implement an animation based movement system because I want to control the grid movement precisely and also be able to track the jump boost window in the animation so I could know if the player hops are timed correctly to get the boost.

My current code (which is not close to working but just to give a sense of where I am at) tries to basically create a runtime animation using the players current location as the starting keyframe and variables for factors like boost multiplier, hop boost window, and last hop time (all of which will change dynamically based on where a player is in the jump combo).

Would love some insight if I am approaching this right or if anyone has built a mechanic like this before and has some wisdom to share :slight_smile:

My current code is included as attachments


GIF Links:
Crossy Road: Crossing Road Jumping Chicken GIF - Crossing Road Jumping Chicken Chicken - Discover & Share GIFs

Mario: Mario | Super Mario 64 Hacks Wiki | Fandom

better mario gif example for the timing: Super Mario 64 Triple Jump animated gif