Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411574 Posts in 69386 Topics- by 58444 Members - Latest Member: darkcitien

May 04, 2024, 04:29:17 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignLet's talk platformer physics.
Pages: [1] 2 3
Print
Author Topic: Let's talk platformer physics.  (Read 12197 times)
J. R. Hill
Level 10
*****

hi


View Profile WWW
« on: March 29, 2010, 07:33:56 PM »

You know the basics, run and jump.  Don't forget about climbing ladders and ropes too!

But most platformers warp physics drastically in all of these.

Running often has little to no momentum behind it.  Running full speed into a wall stops you rather than injures you.  You can usually stop on a dime, but if not don't worry!  You'll probably skid/slide to a stop without respect to the type of terrain you're on.  Try running full speed and sliding to a stop, for example, on concrete.  Aside from that ice level, friction is rarely considered in platformers.

Jumping is more notoriously crazy.  Who among us can decide how far to jump after jumping?  Or change directions in the air?  Or jump again while in the air?  My guess is that unless you have a jetpack you can't do those very well.  We also have a momentum problem similar to running when jumping from tall heights.

These are far from the only things in games that bend physics.  In fact, bending physics is a euphemism.  The standard platformer physics are farther from reality than Looney Tunes.

Is this system of physics a bad thing?  Absolutely not!  Many games have used them successfully, and a player recognizes the same systems from game to game.  In fact, they are so ingrained in a gamer's consciousness that we rarely walk, since all we really need are run and stop.  We rarely think twice about jumping too far and fast, since we know we can slow down in the air.

Is this system of physics necessary?  Absolutely not!  However, adhering to more realistic physics often makes the game too tedious or challenging for some players.  Games like Prince of Persia, Another World, and Flashback are loved more for their atmosphere and difficulty than for the physics we group them by.

So how do you decide which system of physics to use for a particular project?  Or which parts of which systems?
Logged

hi
drChengele
Level 2
**


if (status = UNDER_ATTACK) launch_nukes();


View Profile
« Reply #1 on: March 29, 2010, 07:43:59 PM »

 Games like Prince of Persia, Another World, and Flashback are loved more for their atmosphere and difficulty than for the physics we group them by.
I'm not so sure about that. It would be rather difficult to enjoy these games and immerse in them if they had Mario physics, at least in my opinion. The atmosphere of these games is created in part due to their plausible motion. In Flashback it really felt like you were playing a person stranded in a dangerous sci-fi world rather than just a platformer sprite. Either approach can be botched, though. Tight, responsive controls are the key to this immersion, otherwise it'd shatter in an instant.

Which I suppose answers your question as well - we pick physics which are appropriate to the overall game feel. Mario physics is good for those sorts of games which are more cartoony, or more "gamey" if you will, where you collect coins and mushrooms and stuff like that. Semi-realistic physics is better for the games whose plot or setting is of a more "serious" mood.
Logged

Praetor
Currently working on : tactical battles.
J. R. Hill
Level 10
*****

hi


View Profile WWW
« Reply #2 on: March 29, 2010, 08:03:52 PM »

Good point. My point was that those games are only popular because of the results of a well-implemented physics system, not for the system itself.  So I do agree with you that the physics did contribute significantly to the atmosphere/difficulty.

So my next questions for you, I suppose, would be: is it necessary to have realistic physics to have a serious game?  I don't think it is.  I also don't think it's necessary to have realistic graphics matched with realistic physics all the time.  Why not a game with cartoony characters that behave realistically?  Why not a game with realistic characters that have weird physics?
Logged

hi
Ntero
Level 1
*


View Profile
« Reply #3 on: March 29, 2010, 08:08:12 PM »

Good point. My point was that those games are only popular because of the results of a well-implemented physics system, not for the system itself.  So I do agree with you that the physics did contribute significantly to the atmosphere/difficulty.

So my next questions for you, I suppose, would be: is it necessary to have realistic physics to have a serious game?  I don't think it is.  I also don't think it's necessary to have realistic graphics matched with realistic physics all the time.  Why not a game with cartoony characters that behave realistically?  Why not a game with realistic characters that have weird physics?

I don't think it'd be necessary to have physics matching graphics, but I think it could require some heavy explanation or be central to the games theme.  Otherwise some people could get confused/frustrated and turn off the game.
Logged
drChengele
Level 2
**


if (status = UNDER_ATTACK) launch_nukes();


View Profile
« Reply #4 on: March 29, 2010, 08:31:42 PM »

So my next questions for you, I suppose, would be: is it necessary to have realistic physics to have a serious game?  I don't think it is.  I also don't think it's necessary to have realistic graphics matched with realistic physics all the time.  Why not a game with cartoony characters that behave realistically?  Why not a game with realistic characters that have weird physics?
Sure, why not? Having an underlying theme and sticking to it is good practice, but stirring things up a bit was never frowned upon, especially in the indie community. Generally speaking, dissonance of various themes can be either great and artistic or out-of-place and ridiculous, it's all in the execution. You know, like  a piece of classical music in a motion picture to accompany a gruesome fight scene. Kubrick could pull it off. James Woods probably couldn't.

No matter what physics you employ, they need to be internally consistent and contribute to the gameplay instead of to wrestling with your gamepad. That is in my opinion ten times more important than whether or not physics are "realistic".

I personally prefer more "plausible" physics in my games, i.e. no double-jumps or changing directions after you jump, if for no other reason than because it is used in fewer games. But I enjoy playing games which utilize either.
Logged

Praetor
Currently working on : tactical battles.
Laremere
Level 5
*****



View Profile
« Reply #5 on: March 29, 2010, 08:49:41 PM »

I believe in an early build on Canabalt, the character would have a charge jump that would charge during button press, and releasing would make you jump the said amount.  While in theory this may seem like a plausible idea, in practice it's horrible to control.  It's hard to implement a solid control for controlling how high you want to jump.  Charging requires too much forethought and I have yet to see a system that allows for varied jump height while only requiring input at the initial jump.  By allowing the player to vary height by holding then releasing at desired height, and by allowing the player to control their speed in mid-air, it is much easier to implement a system in which the player can control their target destination while still allowing for them to be able to jump on the shortest notice.  I see double jump as increased mobility, which is a natural evolution for games where mobility is one of the core challenges.

Besides, if we really wanted to follow physics, I don't know anybody who can quite jump like the least powered jumps in plat-formers.
Logged

If a tree falls in the forest and no one is around to hear it, is sound_tree_fall.play() called?

"Everything that is really great and inspiring is created by the individual who can labor in freedom."
-Albert Einstein
J. R. Hill
Level 10
*****

hi


View Profile WWW
« Reply #6 on: March 29, 2010, 10:58:56 PM »

It's hard to implement a solid control for controlling how high you want to jump.  Charging requires too much forethought and I have yet to see a system that allows for varied jump height while only requiring input at the initial jump.
The best way to implement it would be using a velocity sensitive control.  Obviously a keystroke wouldn't work, but a gamepad trigger, or a joystick/mouse movement could easily give quick and varied responses.  Essentially you'd be doing the same thing as an accelerated jump, but quick enough that to the player it would still seem instantaneous.  Obviously the jump height would have to be determined by the player before the jump and not during it.

Quote
Besides, if we really wanted to follow physics, I don't know anybody who can quite jump like the least powered jumps in plat-formers.
The "realistic" jumps in games are often exaggerated from "average" but are far from impossible.  I think the least realistic part of gaming movement is pulling yourself up from ledges.  The average person can't do a single overhand pull-up, much less do them repeatedly.  Although this does have less to do with physics and more to do with human capabilities.
Logged

hi
John Nesky
Level 10
*****


aka shaktool


View Profile WWW
« Reply #7 on: March 29, 2010, 11:49:30 PM »

A study in expectations:



In Super Metroid, the fastest way to fall is to Speed Boost downhill.  Cheesy
Logged
Hangedman
Level 10
*****


Two milkmen go comedy


View Profile WWW
« Reply #8 on: March 30, 2010, 04:07:32 AM »

To put it simply, both kinds of platformers have their place.
But historically, 'realistic' platformers have been slow and with exaggerated movements to show off the detailed flip-hang animations they worked so hard on. In such a case (Blackthorne, Flashback, Prince of Persia) it's not really as much of a platformer so much as a puzzle game where every move is a step towards solving the puzzle (the level) without dying.

Unrealistic platformers allow for speed and ignorance, which makes level designers cry, which is why there are pixel-perfect jumps and roundabout paths, to force you to look at the scenery while your character is busy dying.
Logged

AUST
ITIAMOSIWE (Play it on NG!) - Vision
There but for the grace of unfathomably complex math go I
Chaoseed
Level 3
***



View Profile WWW
« Reply #9 on: March 30, 2010, 06:22:54 AM »

When someone runs on concrete, then up and down slopes—I mean, really physically runs—they're drawing on the experience of an entire life dealing with friction, gravity and momentum.  All that knowledge is ingrained deep in the brain, until it's unconscious, it's instinct, it's just how things are.

But when you're playing a game, you're not pushing yourself through the world with your legs.  You're tapping buttons with your fingers.  All that knowledge you have deep in your brain doesn't get activated.  You don't feel like it's wrong that momentum doesn't exist; you develop a new set of "instincts".

Of course, games like Assassin's Creed and Mirror's Edge (I assume, I haven't actually played Mirror's Edge) get back to a feeling of physicality.
Logged

LemonScented
Level 7
**



View Profile
« Reply #10 on: March 30, 2010, 10:42:25 AM »

I can't think of a single platformer that has completely realistic physics, or even close. Even rotoscoped stuff like Flashback and Prince of Persia seem to routinely feature feats of athleticism which I'm pretty sure are out of the reach of most people. If you've ever tried to make a platformer with realistic physics, with gravity at 9.8m/s^2, a protagonist of suitable mass and properly-modelled leg muscles, wind resistance, friction, the whole thing turns into a mess very quickly. The jump happens a while after the button press, since the character has to bend their legs before jumping, the jumps are not nearly high enough, the gravity feels "floaty" on the descent, and not being able to influence your motion in mid-air can give a disconcertingly out-of-control feeling.

All of which is to say that I don't think I've seen anything that convinces me that realistic platformer physics is desirable, although the level of realism is certainly tunable to match a game's tone, setting, and level design. What I do think would be interesting though, would be a survey of a whole bunch of popular platformers in order to pick out the common elements in them and come up with a set of "rules of thumb" that might help designers tune the physics in a way that's likely to instinctively feel right for fans of the genre. It's something I find maddeningly difficult to get right myself, and given the impact it has on level design and the moment-to-moment gameplay, it's incredibly important to get it just right. I've heard various scraps of statistics, including:

- There was a point in the '90s when a survey found a strong positive correlation betwen the jump height of the player and the number of sales of the game

- Regardless of jump height, there's a set amount of "time spent in the air" that feels "right" to players (I forget the exact number but I think it's somewhere in the order of 3.5 seconds - could be way off though), and the further a game deviates from that norm the more likely players are to complain about the controls.

- In a study of the Mario series, some research people found that (presumably as a result of the above two points) Mario not only jumps absurdly high in most of the games, but he also falls at velocities that accelerate to being fatal even over relatively short distances. Oddly, they also found that both gravity and Mario's maximum jump height have decreased as the series has progressed, which perhaps casts some doubt on the earlier study.

I'd love to know more of this stuff, and have it compiled into some complete, coherent and fact-checked body of work. I'm sure there are all sorts of rules about the degree of in-air control, tunings for friction and momentum, terminal velocity, and stuff like what Mr. Nesky shower, which are pretty pervasive over many games, but without knowing them it can feel a bit like reinventing the wheel to get platform physics that feel good for any given game.
Logged

Valter
Level 10
*****


kekekekeke


View Profile
« Reply #11 on: March 30, 2010, 11:03:49 AM »

I'm currently playing with a platformer engine that ties run and jump speed to a sin function  Who, Me?
Logged
st33d
Guest
« Reply #12 on: March 30, 2010, 11:51:46 AM »

I think a truly realistic platformer with bloody results would be hilarious.

  • face exploding with blood for running into a wall too fast
  • shins going up through the knees when falling too far
  • running too fast, trying to stop immediately - facepavement
  • occasionally tripping up - facepavement
  • trying to run up a hill, and then collapsing out of breath
  • climbing up a ladder, the ladder falls over sideways - facepavement
  • being only able to jump a small distance vertically, tripping on the object you were jumping over - facepavement

the possibilities are endless...
Logged
Valter
Level 10
*****


kekekekeke


View Profile
« Reply #13 on: March 30, 2010, 12:31:02 PM »

Actually, that happens to some extent in Hempuli's FallOver, which I think is conceptually one of the funniest platformer games.
Logged
Shambrook
Level 3
***



View Profile WWW
« Reply #14 on: March 30, 2010, 07:35:04 PM »

I have yet to see a system that allows for varied jump height while only requiring input at the initial jump.  By allowing the player to vary height by holding then releasing at desired height,

Oldschool Megaman games on the Nes do this, and it's necessary in many underwater spike hallways to only jump the absolute bare minimum to clear a gap otherwise you go into the cieling and die.

Quote
I can't think of a single platformer that has completely realistic physics, or even close. Even rotoscoped stuff like Flashback and Prince of Persia seem to routinely feature feats of athleticism which I'm pretty sure are out of the reach of most people.
Alot of stuff is out of the reach of most people but that doesn't mean it's out of reach of everyone. Most of the stuff in say Mirrors Edge is entirley possible to pro tracers.
Logged
Laremere
Level 5
*****



View Profile
« Reply #15 on: March 30, 2010, 08:05:52 PM »

You have kinda taken my quote out of context.  I was saying I had yet seen a system implement a jump system where you could specify the initial amount with a single input, and instead the common solution (because it works and works well, really) is to hold the button for longer jumps, or not hold it for shorter jumps.
Logged

If a tree falls in the forest and no one is around to hear it, is sound_tree_fall.play() called?

"Everything that is really great and inspiring is created by the individual who can labor in freedom."
-Albert Einstein
drChengele
Level 2
**


if (status = UNDER_ATTACK) launch_nukes();


View Profile
« Reply #16 on: March 31, 2010, 10:03:37 AM »

Perhaps a slight biological approach could help us here. Executing jumps in real life involves complex subconscious calculations of our motor cortex. This is dependent on our spatial awareness and a host of other factors (things like deep proprioceptor sensibility and vestibular centres come to mind, but I'll avoid getting technical).  So running and jumping in reality is aided by multiple complex calculations based on intricate inputs of sensors positioned throughout your body which have evolved over millions of years to precisely that purpose.

In a simple game these feedback signals simply cannot be fed to the player in any reasonable manner. All you have to work with in those is visual feedback. Your vestibular cortex still knows you are sitting in a chair, you can only judge distances and speeds by visual cues. This is why people hate jumping puzzles in 3D FPS games - accurate judgement parallel to our real-world capabilities is impossible to achieve.

Platformers and platformer jumps are completely different in that respect. Side-view as opposed to a first-person view throws any vestibular confusion out the window. We are no longer trying to use our spatial awareness to navigate a quasi-3d space, we are observing a protagonist of a 2d world and we aid him in applying a few fairly simple 2d formulae regarding acceleration and thrust. We've learned these equations at a very young age, they have been repeated in platformers since and are thus very intuitive to us, even though they are not realistic.

For the record, I still think that it is possible to make a game where "realistic" jump physics such as determining the jump beforehand and no mid-air manoeuvrability can be a strong selling point instead of a weakness. You just have to be careful to avoid labelling the game as a "platformer" because then that creates a set of expectations in the target population (or indeed might miss your target population altogether). But if you wish to do so, i.e. if you wish to give the character a precontrolled jump with no mid air direction/duration changes, at least make sure you stay true to the "real" model and have some feedback at the time the jump is executed by the player as to where the character will land, because your character (in a world with realistic physics) would just know it intuitively.
Logged

Praetor
Currently working on : tactical battles.
Cokho
Level 3
***


I love anyone who read this !


View Profile
« Reply #17 on: March 31, 2010, 10:09:54 AM »

I think Prinny:Can I really be the hero is kind of working this way: Once you have jumped you can't change your direction or anything.
I hated this  Apoplectic
Logged

Pardon my poor english T_T
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #18 on: March 31, 2010, 12:39:33 PM »

A study in expectations:



In Super Metroid, the fastest way to fall is to Speed Boost downhill.  Cheesy

SONIC!

Sorry have to mention sonic in a platformer discussion
Logged

jotapeh
Level 10
*****


View Profile
« Reply #19 on: April 01, 2010, 04:50:50 AM »

Sonic was cool though in the sense that running up certain types of ramps would send you flying. And also that 2.5D loop de loop. God that impressed the hell out of me.
Logged
Pages: [1] 2 3
Print
Jump to:  

Theme orange-lt created by panic