Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
    
Don't try to emulate other games. Do what feels right. Learn the math behind it or use a physics framework like Box2D. –  knight666 Jun 26 '12 at 13:20
1  
-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/… –  Jeff Jun 26 '12 at 13:31
    
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. –  Carlosrdz1 Jun 26 '12 at 17:30
add comment

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!

share|improve this answer
    
Are there any tools for doing this? Or would one just take video of various play tests and then do the pixel counting? –  Jeff Jun 26 '12 at 13:47
2  
Pixel counting recorded video. That's the simplest way. –  Byte56 Jun 26 '12 at 14:22
    
Thank you @Byte56, I'll try that. –  Carlosrdz1 Jun 26 '12 at 17:29
    
Sure thing, remember to post your results somewhere. Then there will be a page for something like that. –  Byte56 Jun 26 '12 at 17:42
add comment

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).

share|improve this answer
    
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 :) –  Carlosrdz1 Jun 26 '12 at 20:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.