When the character stops having a ground below it, give a it couple of frames of tolerance to allow it to jump, depending on the implementation or desired behaviour you may need to give an extra boost to compensate the gravity force applied on those frames.
Although I like the name convention for it I find it feels better to allow the character to fall while even though it can still jump as it feels more natural, instead of letting it keep walking as it there was an invisible floor.
floor=false coyote=0 function update() past_floor=floor floor=check_floor() if(past_floor && !floor) then coyote=10 end if(btn(jump_button)) and floor or coyote > 0 then do_jump() end coyote = max(0,coyote-1) end
Halved gravity jump
Swept collision detection
- Full Celeste Twitter thread
- AABB + Swept collisions on GBC
- Kyle Pulver nudge Assistance
- Kyle Pulver coyote jumping
- Rodrigo Monteiro The Guide to implementing 2D platformers
- Sonic collisions
- Yoann Pignole Platformer controls
- Advance Platform movemnt
- Jumping Graphs For Platformer Games
- N++ Collision Detection and Response
- Why Does Celeste Feel So Good to Play? | Game Maker's Toolkit