I'm making a platform engine with XNA Game Studio, and I've solved almost everything about colliding stuff. But now, I'm searching for good physics for the player, I'm trying to emulate characters from other games like Mario from Super Mario World, or MegaMan X... do you know a website or something, where the physics from that games are revealed? I remember seen a page with something like that.

Or what's the process you think is the best to emulate physics from other games? Just trial and error?

Thank you.

  • \$\begingroup\$ Don't try to emulate other games. Do what feels right. Learn the math behind it or use a physics framework like Box2D. \$\endgroup\$
    – knight666
    Commented Jun 26, 2012 at 13:20
  • 1
    \$\begingroup\$ -1 knight666's comment. I asked about Mario physics in particular, and got nothing more useful than looking at the ROM: gamedev.stackexchange.com/questions/6618/… There are known sonic analysis out there, so you could look at those. Also someone linked this earlier today that's pretty interesting: higherorderfun.com/blog/2012/05/20/… \$\endgroup\$
    – Jeff
    Commented Jun 26, 2012 at 13:31
  • \$\begingroup\$ Thank you, I'll look at the game, I guess that's the answer. @knight666, I'm trying to emulate other games because I want to make FanGames, I would use my own physics if I were doing an original game. \$\endgroup\$
    – Carlosrdz1
    Commented Jun 26, 2012 at 17:30

2 Answers 2


Empirical testing. The physics are revealed to you when you play the game, you just need to collect numbers for what you're seeing. For each game you want to emulate you need to collect:

  • Pixel to meter ratio
  • Gravity applied (can be tested by allowing the character to fall, you need to measure the change in velocity over time, I suggest video recording and frame by frame playback)
  • Maximum jump height
  • Maximum sprint speed
  • Any number of other effects applied to the character (air drag, stamina constraints, time dilatation, etc.)

With all that information you can re-create the physics for a particular character. Sounds like a lot of work, but that's because it is. Good luck!

  • \$\begingroup\$ Are there any tools for doing this? Or would one just take video of various play tests and then do the pixel counting? \$\endgroup\$
    – Jeff
    Commented Jun 26, 2012 at 13:47
  • 2
    \$\begingroup\$ Pixel counting recorded video. That's the simplest way. \$\endgroup\$
    – House
    Commented Jun 26, 2012 at 14:22
  • \$\begingroup\$ Sure thing, remember to post your results somewhere. Then there will be a page for something like that. \$\endgroup\$
    – House
    Commented Jun 26, 2012 at 17:42

There is no way you can directly use another game's physics, unless they give a public API for that (for example: Super Smash Bros Brawl's Havok and Mirror's Edge's PhysX are free to use).

What you can do is try to reproduce its effects. In this case... well, it's a matter of trying. Check your numbers, test your algorithm, see if it's working.

I think older games didn't have a accelerated gravity, for example. The character was either going up of falling.

What I can suggest to you is start from some library as Box2D and go for trial-and-error on the numbers until you get some satisfactory result. The other option is make your own simple physics engine (which I recommend).

  • \$\begingroup\$ Well, I wasn't searching for some code from the game or an API of the physics, I was looking for formulas or values that they used, based on pixels. I remember seeing that from Sonic or Megaman X game, but I can't find it. But yeah, trial-and-error seems to be the best way. Thanks for the answer :) \$\endgroup\$
    – Carlosrdz1
    Commented Jun 26, 2012 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .