Game Development

11/09/202011/09/20
It may take you 1 minutes to read.

Platforming

Coyote jumping

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

Corner correction

Swept collision detection

Moving platforms

Resources Dump

PICO-8