Jump to content

  • Log In with Google      Sign In   
  • Create Account


Player move while jumping


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 Ozelo   Members   -  Reputation: 100

Like
0Likes
Like

Posted 19 October 2011 - 07:24 AM

I would like to start a thread here on the subject above.

I'm a beginner at all, but I thought I should discuss it on game programming, as I am talking about concept here.

I'm coding a player move supposed to be realistic, but when I did a fast research on actual "realistic" games seems no one do it really realistic. Then I started to think that it is coded that way on purpose to not ruin gameplay experience based on "how realistic it will behave". Isn't that true?

Consider the following:

Case 1: First tap jump, then press to move any direction. The player will move while in the air. (Not so realistic, but handy in gameplay);

Case 2: First tap jump, then press to move any direction. The player DO NOT move until its foots touch again a required material to apply a force of some kind, then, finally moves in response to that force. (Realistic, but well, that's just dandy, isn't?);


What you think about it? Pls, post your thoughts.

Sponsor:

#2 Wooh   Members   -  Reputation: 532

Like
0Likes
Like

Posted 19 October 2011 - 08:53 AM

Case 1 is good for platform games. Often you can also affect the hight of the jump while in the air. In these games jumping is very important for the gameplay. With realistic jumping it would be much harder and boring. Platform games are usually not very realistic anyway.

Case 2 is better for more realistic types of games like first person shooters.

#3 Dawoodoz   Members   -  Reputation: 290

Like
0Likes
Like

Posted 19 October 2011 - 09:02 AM

The human physics is usually a capsule with a velocity offset in the friction to move using friction instead of working against it with a jet engine.
Holding down the button to bend down and jumping when it is released is more realistic than instantly jumping with only the feets.
When crouching, pull in the bottom of the capsule.
When jumping, extend the bottom of the capsule.

By jumping against a wall while walking in the opposite direction, you can kick against the wall to make a diagonal jump.
This can be done with a collision sphere moving sideways inside the capsule.

My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz

"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."


#4 Ozelo   Members   -  Reputation: 100

Like
0Likes
Like

Posted 19 October 2011 - 11:10 AM

I'm sorry, I forgot to mention "first person" perspective about what I was talking, but you made a good point. Its depend on gameplay genre at all. I'm not sure how much bfbc2 is close to reality as fps, but Wooh, it still move while you are in the air (without parachutes of course).

But getting to the point of a gameplay experience, of course, fidelity to reality belongs to serious play (aka simulators). Dawoodoz made another good point here, extending the complexity on a gameplay jump while kicking or holding keys to achieve different action levels.

That's totally different for third person perspectives, specially on fighting games.

Guess the answer is that "reality" follow gameplay experience depending on overall game goals instead of how goes the gameplay experience that follows reality. I mean, when someone thrown a nade to explode out there, you may wish to look right directly at it to "see" the explosion. So people would certainly avoid to code their player characters to be able to "blink" when something like that happens, although sounds fun as flashbangs usually do.

Glad to have such good comments. ty

#5 Sharpe   Members   -  Reputation: 144

Like
0Likes
Like

Posted 19 October 2011 - 12:08 PM

It's funny; this is something I often mention while playing games. Just a few days ago, I was playing Call of Duty Black Ops with a friend on his Xbox 360 and I talked about jumping. :lol:

Most often, in addition to being able to control your character in mid air a if they had air jets or something, the jump height is absolutely ridiculous. It's not nearly so bad in FPS, but in platformers, players are jumping like, 20 feet in the air or more with ease!

One classic, 1989 platform game that has pretty realistic jumping physics, IMO, is Prince of Persia. Here's a video example:

Just wanted to say that you're not the only one who thinks about the realism of jumping in video games! :)
A 30-year-old interested in learning to program by making an old-school, simple, text-only or 2D dungeon fantasy video game.

  • As of 9/28/2011, currently attempting to learn the basics of Python 2.7.
  • As of 10/14/11, Dabbling in C#.
  • As of 10/24/11, decisively surpassed my small knowledge of Python in C#.

#6 AllEightUp   Moderators   -  Reputation: 4064

Like
0Likes
Like

Posted 19 October 2011 - 06:29 PM

Jumping is a fairly consistent point of contention in most games because it is an "exception" to many rules. Making it completely realistic usually feels and plays bad in games and as such, 90% of the time games don't say G = 32 feet per second per second, but "only" for jump. Yes, I know it's a silly exceptional case but real gravity just doesn't "feel/play" well in most cases.

Now getting back to the tap behavior and/or movement in air, that's another subject about "look/feel" etc. Movement in air often tries to compensate for the natural ability of a "human" to correct their landing location by extending their legs a little bit or pulling them back a bit when they realize they didn't get the exact air time they expected. In order to simulate this ability usually a little "air control" is allowed to make up for not being able to adjust body attitude/shape during the jump.

Games which don't allow air control are often of the type where jumping is not an absolute game play feature but more of a "bonus" if you can time it correctly. (Original Tomb Raider as I remember it.)

So, I don't have an absolute opinion on this as I've done many variations but almost always directly related to what "felt best" for the type of game I was working on. What best works for your specific design desire is really up to the game in question. Realistic usually just doesn't work, so consider what you really want in terms of game play.

#7 keelx   Members   -  Reputation: 104

Like
0Likes
Like

Posted 19 October 2011 - 09:13 PM

Well, consider this.
YOU are running. You suddenly decide to jump. While you are running, you jump, but you continue to move forward even though you aren't on the ground. It's called inertia. Non-realistic games let you move in mid-air. Non-realistic games make you come to a dead halt when your feet leave the ground. Realistic games (think mario if you're going 2d) use inertia, friction, vectors with gravity, terminal velocity, etc. to make a realistic, yet enjoyable gaming experience.

#8 AllEightUp   Moderators   -  Reputation: 4064

Like
1Likes
Like

Posted 21 October 2011 - 09:13 PM

Well, consider this.
YOU are running. You suddenly decide to jump. While you are running, you jump, but you continue to move forward even though you aren't on the ground. It's called inertia. Non-realistic games let you move in mid-air. Non-realistic games make you come to a dead halt when your feet leave the ground. Realistic games (think mario if you're going 2d) use inertia, friction, vectors with gravity, terminal velocity, etc. to make a realistic, yet enjoyable gaming experience.



Consider this back. *You* are running and suddenly decide to jump. You "can't" jump in almost 90% of the normal human running stride because either your feet are off the ground, are in very bad locations to get any leverage to actually jump more than a couple centimeters, etc. It takes a near act of god to make sure your feet are properly located/aligned to be able to apply any vertical force during an actual run. Mario is unfortunately too trivial to see how this looks odd, given a decently detailed model it is very "EASY" to see. The problem is that even if it is last second, a real person can take a short stride in order to jump off of the proper foot, this is recognizing what you want to do maybe only a fraction of a second before needing to do it.

Games don't have that preconception though. You may personally be sitting behind the controller waiting for the proper "distance" before jumping, but to trigger the jump immediately means lack of lots of reality. Jumps are always exceptions to being realistic.

#9 Ozelo   Members   -  Reputation: 100

Like
0Likes
Like

Posted 24 October 2011 - 12:53 PM

Pretty arguments. YES, the way you code it may directly depend on the whole gameplay behavior. not necessarily "realistic". We can see this as few or simply no syncro with character animation in favor of a reliable gameplay. But speaking strict to what "realistic" means on gameplay taking into account the players character, I guess we can say that every action "must" be a scheduled character animation for realistic results. In other words, in reality you just can't go from prone position to jumping without standing or charging before jump. A equilibrium on those "few variables" and a "whole complex bunch of enviro/character/ground/physics variables" seems to be the line.

#10 AllEightUp   Moderators   -  Reputation: 4064

Like
0Likes
Like

Posted 25 October 2011 - 07:37 PM

Pretty arguments. YES, the way you code it may directly depend on the whole gameplay behavior. not necessarily "realistic". We can see this as few or simply no syncro with character animation in favor of a reliable gameplay. But speaking strict to what "realistic" means on gameplay taking into account the players character, I guess we can say that every action "must" be a scheduled character animation for realistic results. In other words, in reality you just can't go from prone position to jumping without standing or charging before jump. A equilibrium on those "few variables" and a "whole complex bunch of enviro/character/ground/physics variables" seems to be the line.


That's an interesting description: "pretty" arguments. It is proper though, it depends on your game's specific need of reality. Is going from prone to jump a desirable gameplay feature or is the reality of getting to at least a kneel position before jump becomes valid something which makes the game fun, or gives it the challenge of player strategy etc? My point is always going to be what level of reality do you want/need to make a fun game? I don't want to question the decisions made by others, I simply question things due to the fact that I've always had to avoid reality in some way or another (but make it look good regardless) on every game I've worked on, even when they were sprites. So, when folks say: "reality", I throw out questions which should be asked and considered as to just how much "reality" is appropriate and how much needs to be thrown out for "fun" reasons.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS