Search found 3 matches

by secretsue92
Tue Apr 23, 2024 7:22 am
Forum: Support and Development
Topic: [SOLVED] Variable Jump Height
Replies: 5
Views: 319

Re: Variable Jump Height

No problem. dy is the y velocity of the player, analogous to your yspeed. There's a separate function that handles moving and colliding the player using dx and dy but it doesn't affect how the jump works (Aside from setting those values to 0 in the event of a collision on the relevant axis) Ok, aft...
by secretsue92
Tue Apr 23, 2024 7:08 am
Forum: Support and Development
Topic: [SOLVED] Variable Jump Height
Replies: 5
Views: 319

Re: Variable Jump Height

This is how I've done it in a pico8 game I'm working on. if not btn(btnjmp) and jt<10 then jmpheld=false end jt+=1 if jt<=minjmp or (jmpheld and jt<=maxjmp) then plyr.dy=-1 end I run this code while the player is jumping after gravity is applied. It essentially overrides the gravity when the player...
by secretsue92
Tue Apr 23, 2024 12:19 am
Forum: Support and Development
Topic: [SOLVED] Variable Jump Height
Replies: 5
Views: 319

[SOLVED] Variable Jump Height

Hello, I'm making a Mario clone, and I'm stuck implementing variable jump height. Regarding the player's vertical movement, I've added: - falling with gradually increasing speed that is capped at a certain point - jumping with fixed height (the jump height is really small, it's meant to be the minim...