Advertisement

2D platformer + stopping

Started by June 30, 2009 01:00 AM
9 comments, last by lithos 15 years, 7 months ago
For sake of discussion lets say we have a 2D platformer in the the most generic form. Now lets say your character is running along and then needs to stop. The question is how are we going to stop the character now that the player no longer wants to move. Do we spend a very short period of time, say a tenth of a second, slowly stop the character? Do we instantly stop the character? Or do we do something completely different?
I believe the psycologically correct time for player input response is between 100 and 200 milliseconds. So a slow down in that time would be acceptable. Shorter response time is often considered better because a harder game (faster reflexes) is generally better than a boring or unresponsive game.

Advertisement
It depends on your game.

Does the player require very precise stopping, or will a small margin-of-error allow them to play succesfully?

Does it feel jarring to stop instantly? How fast can the character potentially be moving when they need to stop? How far ahead is the player able to see an obstacle they need to stop or otherwise react to deal with?

Does it feel unresponsive to stop gradually? Does it break immersion when the player sees the character do so?



In general I would suggest that stopping time be at least reasonably quick - the player will be annoyed and feel helpless if the controls feel overly unresponsive.

- Jason Astle-Adams

Depends entirely on what kind of "feel" you want from your game, there is no single correct answer. Longer stopping times will make the character movement seem smoother but less responsive, shorter times will feel more responsive but can feel harsh and "unrealistic". Contrast Prince Of Persia with it's long stop/start animations against Chukie Egg and it's instant stop/start.

If your game requires precise jumping (like a Mario game) then long start/stop times will make the game unnessisarily hard and seem unfair. But if you've got a game where you've got huge platforms and forgiving jumps then a bit more momentum is allowable.

Personally I'd keep it short and snappy, something like a 4-8 frames (@60Hz). Anything less can feel to too game-y, anything more tends to annoy your players.
Oh, and no matter how long/short you make the start/stop animations you *must* allow the player to interrupt them with a jump. If you only allow jumping when either fully moving or fully stopped you end up with a laggy unplayable mess.

I found this out the hard way - it took me ages to figure out why the controls felt so rubbish.

In my opinion, I've never really been fond of games that have delayed stopping/starting. To me it seems like an unnecessary addition that was just thrown in to try and make the game seem more detailed, when really all it does is take away tactile feedback.

Mario works so well as a platformer because the character moves as soon as the player pushes a button and stops the moment the player isn't pressing the button. This direct feedback makes controlling the character more enjoyable and provides more precision.

Though again, this is just my opinion. It's really up to you how you want your platformer to play out. If you want precise and frantic action, go with mario style. If you want to not focus so much on jumping gaps and going from platform to platform, then add in some delays. But please for the love of all that is good in this world... do NOT have delayed stopping/starting in a mario type game.

[size="3"]Thrones Online - Tactical Turnbased RPG
Visit my website to check out the latest updates on my online game
Advertisement
Most platforming games will have different values for the following:

* Running acceleration
* Running deceleration
* In-air acceleration
* In-air deceleration

As long as you're on the ground and pressing in the current direction of travel, you apply the "running acceleration" value. If you aren't pressing any direction, or you're pressing opposed to the direction you're traveling in, then you use the deceleration instead. And of course, if you're in the air you use the in-air values.

As for what the values should be, generally I'd say it shouldn't take more than half a second or so to reach a full stop from full-speed movement.
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels
It depends on the game. If you are going for a mario bros clone than stop him right away, if you are going for some weirdo physics like N than you can you use friction and focres to stop him
I dream hard of helping people.
Quote:
Original post by lithos
The question is how are we going to stop the character now that the player no longer wants to move.
Do we spend a very short period of time, say a tenth of a second, slowly stop the character?
Do we instantly stop the character?
Or do we do something completely different?

Have you looked yet at existing games to see how those work, and what's good and bad about how those games work, in terms of how your game should work?

-- Tom Sloper -- sloperama.com

Quote:
Original post by Aiursrage
It depends on the game. If you are going for a mario bros clone than stop him right away, if you are going for some weirdo physics like N than you can you use friction and focres to stop him
In fact, Mario does not stop right away; he has a skidding animation, even in the first NES game. Immediate stopping (and in general, making characters too nimble) can actually make the game hard to control, since players tend to expect at least a little lag between action and result.
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels

This topic is closed to new replies.

Advertisement