coyotetime.lua - "Argh, the jump didn't jump!"

Share and discuss custom LunaLua code and content packs for SMBX2.
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8439
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

coyotetime.lua - "Argh, the jump didn't jump!"

Postby Enjl » Sun May 24, 2020 4:00 am

A staple in platformers for decades (notably used in the DKC series since the first entry, for example). Coyote time describes the idea of being able to jump a few frames after leaving the ground, in a nod to Wile E. Coyote from Road Runner.

This script is multiplayer compatible.

The script:
https://pastebin.com/2eb5i94B

You can customize:
coyotetime.frames: A number value corresponding to the frames of coyote time. Default is 5.
coyotetime.onJump: A function to override, with the parameters passed as a jumping player and whether they are spinjumping. If you have any silly jump modifications in your own code, this is where you can take care of them.

Short demonstration:
Spoiler: show
Image
The ABC of Creation
________________________________________________________
Image

User avatar
FireSeraphim
Spiny
Spiny
Posts: 48
Joined: Wed Apr 16, 2014 4:21 pm
Flair: Verified Professional Vampire Hunter
Current Project: Super Mario Zeal (SMBX), The Edge of Time - The Producer's Cut (Doom 2 - Hell on Earth)
Chat Username: FireSeraphim
Contact:

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby FireSeraphim » Mon May 25, 2020 1:17 am

This is a pretty nifty addition although I personally refer to it as the "Drop Hop".
Image

lan vuhoang
Koopa Troopa
Koopa Troopa
Posts: 25
Joined: Wed Jul 03, 2019 7:31 am

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby lan vuhoang » Mon May 25, 2020 7:41 am

And I refer to it as "Jump Extension" as it was how it's called in Doom Eternal.

User avatar
Taycamgame
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 1359
Joined: Mon Jun 19, 2017 11:35 am
Flair: Stargard
Current Project: Mario's Kingdom Adventure
Chat Username: Taycamgame
Contact:

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby Taycamgame » Mon May 25, 2020 8:52 am

And I refer to it as the "midair jump" because that is what it is.
Or alternatively, the "fall canceller", or even "invisible ledge jump". :)
Official Level Reviewer (My Gold Yoshi Egg rank replaced the level reviewer icon, but i am still a level reviewer).
Image
Image
Image
Image
Check out the World Map Service that i host:
viewtopic.php?p=316733#p316733
Check out the projects i support:
Spoiler: show
ImageImage
Image
Image
Quotes: show
xDestroy wrote:
Wellington Games wrote:Taycamgame, I know how to take screenshots in the SMBX.
https://nsmbx.proboards.com/
------
Tower Mario Bros.

User avatar
Hoeloe
Kamikaze Koopa
Kamikaze Koopa
Posts: 1207
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Current Project: A2XT Episode 2

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby Hoeloe » Mon May 25, 2020 12:12 pm

I mean... you can call it what you like, but "coyote time" is the industry standard term.

User avatar
Taycamgame
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 1359
Joined: Mon Jun 19, 2017 11:35 am
Flair: Stargard
Current Project: Mario's Kingdom Adventure
Chat Username: Taycamgame
Contact:

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby Taycamgame » Mon May 25, 2020 12:42 pm

Hoeloe wrote:
Mon May 25, 2020 12:12 pm
I mean... you can call it what you like, but "coyote time" is the industry standard term.
Didn't know that... though to be fair I suppose Enjl would not have plucked a random animal out of thin air :D
Official Level Reviewer (My Gold Yoshi Egg rank replaced the level reviewer icon, but i am still a level reviewer).
Image
Image
Image
Image
Check out the World Map Service that i host:
viewtopic.php?p=316733#p316733
Check out the projects i support:
Spoiler: show
ImageImage
Image
Image
Quotes: show
xDestroy wrote:
Wellington Games wrote:Taycamgame, I know how to take screenshots in the SMBX.
https://nsmbx.proboards.com/
------
Tower Mario Bros.

User avatar
PROX
Mouser
Mouser
Posts: 1825
Joined: Sun Jul 06, 2014 8:50 pm
Chat Username: PROX

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby PROX » Wed May 27, 2020 3:36 pm

ah yes, this definitely fixes the notorious "I refuse to jump" issue.
I believe and I accept Jesus Christ as my Lord and Savior. If you do, put this in your signature.

If it makes sense then it must make dollars

Youtube Channel: ProxyHax O.O

Please do not use my stuff until I release it. Thank you.

My Graphics Pack:
Image

World Map Pack: viewtopic.php?f=31&t=20173

User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 631
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Current Project: Mario Heroes: The First Chapter Remade (MH1.5)
Chat Username: Doc
Contact:

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby DrMekar » Sat Jun 06, 2020 6:28 am

Would it be possible to limit the abilty to one (legacy) Character like Toad?
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8439
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby Enjl » Sat Jun 06, 2020 7:00 am

DrMekar wrote:
Sat Jun 06, 2020 6:28 am
Would it be possible to limit the abilty to one (legacy) Character like Toad?
Encase the scope of the player for loop in a character check.
The ABC of Creation
________________________________________________________
Image

User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 631
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Current Project: Mario Heroes: The First Chapter Remade (MH1.5)
Chat Username: Doc
Contact:

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby DrMekar » Sat Jun 06, 2020 7:56 am

Enjl wrote:
Sat Jun 06, 2020 7:00 am
DrMekar wrote:
Sat Jun 06, 2020 6:28 am
Would it be possible to limit the abilty to one (legacy) Character like Toad?
Encase the scope of the player for loop in a character check.
Could you show me where I have to encase the Character Check?
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8439
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby Enjl » Sat Jun 06, 2020 8:31 am

DrMekar wrote:
Sat Jun 06, 2020 7:56 am
Enjl wrote:
Sat Jun 06, 2020 7:00 am
DrMekar wrote:
Sat Jun 06, 2020 6:28 am
Would it be possible to limit the abilty to one (legacy) Character like Toad?
Encase the scope of the player for loop in a character check.
Could you show me where I have to encase the Character Check?
Like I said, everything inside the player for loop. An if statement that starts just after the for loop begins, and ends just before it closes.
The ABC of Creation
________________________________________________________
Image

User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 631
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Current Project: Mario Heroes: The First Chapter Remade (MH1.5)
Chat Username: Doc
Contact:

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby DrMekar » Sat Jun 06, 2020 9:27 am

Enjl wrote:
Sat Jun 06, 2020 8:31 am
DrMekar wrote:
Sat Jun 06, 2020 7:56 am
Enjl wrote:
Sat Jun 06, 2020 7:00 am

Encase the scope of the player for loop in a character check.
Could you show me where I have to encase the Character Check?
Like I said, everything inside the player for loop. An if statement that starts just after the for loop begins, and ends just before it closes.

Code: Select all

function ct.onTick()
    for k,p in ipairs(Player.get()) do
So after this section, right?
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8439
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby Enjl » Sat Jun 06, 2020 9:53 am

DrMekar wrote:
Sat Jun 06, 2020 9:27 am
Enjl wrote:
Sat Jun 06, 2020 8:31 am
DrMekar wrote:
Sat Jun 06, 2020 7:56 am


Could you show me where I have to encase the Character Check?
Like I said, everything inside the player for loop. An if statement that starts just after the for loop begins, and ends just before it closes.

Code: Select all

function ct.onTick()
    for k,p in ipairs(Player.get()) do
So after this section, right?
Yes.
The ABC of Creation
________________________________________________________
Image

User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 631
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Current Project: Mario Heroes: The First Chapter Remade (MH1.5)
Chat Username: Doc
Contact:

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby DrMekar » Sat Jun 06, 2020 11:42 am

Enjl wrote:
Sat Jun 06, 2020 9:53 am
DrMekar wrote:
Sat Jun 06, 2020 9:27 am
Enjl wrote:
Sat Jun 06, 2020 8:31 am

Like I said, everything inside the player for loop. An if statement that starts just after the for loop begins, and ends just before it closes.

Code: Select all

function ct.onTick()
    for k,p in ipairs(Player.get()) do
So after this section, right?
Yes.
Okay, Thank You.
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

Eclipsed
Boom Boom
Boom Boom
Posts: 1748
Joined: Tue Mar 13, 2018 6:15 pm
Chat Username: Eclipsed

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby Eclipsed » Mon Jun 08, 2020 2:39 am

Enjl wrote:
Sun May 24, 2020 4:00 am
Ping
I was wondering since you made this script if you were planning on making a buffer jump script that basically fixes the other issue of why sometimes jumping of smbx doesn't feel like it'd come out.

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8439
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby Enjl » Mon Jun 08, 2020 2:43 am

Eclipsed wrote:
Mon Jun 08, 2020 2:39 am
Enjl wrote:
Sun May 24, 2020 4:00 am
Ping
I was wondering since you made this script if you were planning on making a buffer jump script that basically fixes the other issue of why sometimes jumping of smbx doesn't feel like it'd come out.
Not at the moment. I have something like that in my episode, but it works in a way in which it's not suitable for abstracting into a script, unlike coyotetime and playerphysicspatch were. I'd need to rewrite it from scratch to make it work as a library, which is something I miiight do in the future, but that's not a promise and more my own uncertainty.
The ABC of Creation
________________________________________________________
Image

Eclipsed
Boom Boom
Boom Boom
Posts: 1748
Joined: Tue Mar 13, 2018 6:15 pm
Chat Username: Eclipsed

Re: coyotetime.lua - "Argh, the jump didn't jump!"

Postby Eclipsed » Sat Jun 13, 2020 4:23 am

Enjl wrote:
Mon Jun 08, 2020 2:43 am
Text above
Sounds interesting. Also, by any chance does it have a fix to the fact that if you spinjump and then press jump the frame you land, you still maintain a spin jump state. Or is that not included since the character in your episode based off of link,


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests