making a character jump: physics or old-school style??

I’m currently developing a running game.
So far, i haven’t found a need to use physics.
I manually detect collisions and stuff, but when it comes to making the character jump, i can’t find a way to make it look natural (it doesn’t have to be a perfect real life simulation) like a SNES mario or megaman game.

Does anyone know how to achieve this old-school style or should i use physics? Moreover, what are the real benefits of using physics in this kind of game? I don’t have the need to make things collide and bouce around like a physics game, so, i don’t believe it is really needed…

Any help will be appreciated!
Thanks!! [import]uid: 105206 topic_id: 24032 reply_id: 324032[/import]

I know I’m only one of a few people around here who believe Physics should be a “last choice” for things unless you need physics.

A couple of thoughts on non physics ways to do this.

  1. Roll your own. Gravity is 9.8 meters per second per second. So if your jump up has a fall time of 2 seconds, have your character fall 1/3 of the pixels in the 1st second and 2/3 of the pixels in the 2nd second. In other words falling speed basically doubles each second until you hit your max speed. Going upward you can do the same thing. Move 2/3 of the total height in the 1st second and 1/3 in the 2nd second. I’m sure there are more accurate equations that you can find on a google search.

  2. Use Transitions with easings. Now I don’t know what each of the different easings do, but some move fast then slow down (going up) and others start slow and end up fast. This should give you a rough approximation of a smooth jump.

[import]uid: 19626 topic_id: 24032 reply_id: 96871[/import]

Great, thanks rob!
i thought i shouldn’t use transitions for this, but i’ll try it.
now, i want to make the height of the jump change according to how long the user touch is. Should i do this with the system time? [import]uid: 105206 topic_id: 24032 reply_id: 96877[/import]

Some useful informations in the following thread maybe ?
Arc’d jumping method? [import]uid: 95346 topic_id: 24032 reply_id: 96977[/import]

Lots of useful information in that thread. Thanks! [import]uid: 105206 topic_id: 24032 reply_id: 97099[/import]