Pixel perfect mario physic ?

Started by
2 comments, last by Dragonsoulj 12 years, 7 months ago
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)
Advertisement
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.
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):

0f4c4ab591cb2056d28ffb7328100b0f.png


30fb2177720aadbd32ef942603af26aa.png


f99104f6fbb908a8b6bff59068fce56f.png


47f9b222b5c53d00ec9583d3d8032877.png
http://hypertextbook.com/facts/2007/mariogravity.shtml Should help.

This topic is closed to new replies.

Advertisement