SMB1 Physics

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

thedarkcave215
Buster Beetle
Buster Beetle
Posts: 81
Joined: Tue Jun 09, 2020 2:30 pm
Flair: Bubbly drinks are best served cold.

SMB1 Physics

Postby thedarkcave215 » Fri Jul 03, 2020 2:57 pm

Is there a way to recreate SMB1's running & jumping physics? In that game, Mario's jump height is short, but he stays in the air for longer, and he seems to stop a lot faster.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: SMB1 Physics

Postby Emral » Fri Jul 03, 2020 3:00 pm

A combination of playerphysicspatch and modification of Defines.player_runspeed and Defines.player_walkspeed and Defines.player_grav (acceleration) and Defines.gravity (terminal velocity) might get you there.

thedarkcave215
Buster Beetle
Buster Beetle
Posts: 81
Joined: Tue Jun 09, 2020 2:30 pm
Flair: Bubbly drinks are best served cold.

Re: SMB1 Physics

Postby thedarkcave215 » Fri Jul 03, 2020 10:17 pm

Enjl wrote:
Fri Jul 03, 2020 3:00 pm
A combination of playerphysicspatch and modification of Defines.player_runspeed and Defines.player_walkspeed and Defines.player_grav (acceleration) and Defines.gravity (terminal velocity) might get you there.
Is there a way that I can do that episode-specific?

Lusho
Blooper
Blooper
Posts: 163
Joined: Wed Dec 25, 2019 11:39 pm
Flair: Intention is what matters
Pronouns: he/him

Re: SMB1 Physics

Postby Lusho » Fri Jul 03, 2020 10:30 pm

Uhh, what do you mean?, like that is something that happens episode specific, I don't see how some code would leak to other episodes (not counting having to modify the scripts folder which is a really bad idea)

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: SMB1 Physics

Postby Emral » Sat Jul 04, 2020 7:28 am

As CJ said, all code you write is level or episode specific. Which one it is depends on where you put your luna.lua that runs the code (episode folder or level folder). The defines values for example are just global physics modifiers, which reset on reload and thus are best set in onStart:
https://wohlsoft.ru/pgewiki/SMBX_Fields
The playerphysicspatch library fills a similar niche.

thedarkcave215
Buster Beetle
Buster Beetle
Posts: 81
Joined: Tue Jun 09, 2020 2:30 pm
Flair: Bubbly drinks are best served cold.

Re: SMB1 Physics

Postby thedarkcave215 » Sat Jul 04, 2020 11:58 am

Enjl wrote:
Sat Jul 04, 2020 7:28 am
As CJ said, all code you write is level or episode specific. Which one it is depends on where you put your luna.lua that runs the code (episode folder or level folder). The defines values for example are just global physics modifiers, which reset on reload and thus are best set in onStart:
https://wohlsoft.ru/pgewiki/SMBX_Fields
The playerphysicspatch library fills a similar niche.
My worry was that I tried to set Mario & Luigi's costumes to SMW-MARIO and SMW-LUIGI but that code carried over to every episode in my worlds folder, even though I had it placed in one particular episode folder.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari