# Pixel perfect mario physic ?

This topic is 2677 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've always wondered, does anyone know the equations for running and jumping behind the first mario game ?

I mean, how would I go to recreate a game with the exact same feel ?
- capture lots of screenshots and deduce the equations ?
- reverse engineer the nes code ?
- someone has done it before ? (A quick google search didn't turn up anything)

##### Share on other sites
Short: Im not sure on the specifics, but it seems like you jump higher as you hold jump, accelerate smoothly for a bit, then slow->crest->fall as gravity kicks in. This and "playing is the only way to get the feel right" is my advice, play lots of the game you're looking to recreate.

Long: Well, there are a few things to consider first. Mainly, can you program the basics of a side scroller? If so, do so. Then pick up a copy of said Mario game. Hopefully you will be able to have the NES running on a TV so you can have your own platformer running at the same time. Now you just have to tweak! Potentially lots!

In all seriousness, Im sure its been done, but not by me, and since reverse engineering commercial software is shady, anyone who has may be shy to talking about it too openly. I would just play lots of Mario. You want to recreate it's feel, so you're going to have to get intimate with its feel. Something you can't quite get without playing the game.

##### Share on other sites
You could probably solve some simple physics equations for 2D - parabolic motion. You would need to find out what the initial velocity that the character has as well as the value that is used for gravity. I doubt its anything really complicated as they probably didn't have any forces other then gravity. Measuring time and maximum jump height would probably be useful.

Here are the basic equations that you would fiddle around with (pulled from http://en.wikipedia....tions_of_motion):

##### Share on other sites
http://hypertextbook.com/facts/2007/mariogravity.shtml Should help.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 9
• 13
• 9
• 9
• 15
• ### Forum Statistics

• Total Topics
634078
• Total Posts
3015362
×