Jump height question.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Siggi
- Posts: 3288
- Joined: Sun Oct 03, 2004 8:57 am
- Preferred Pronouns: They/Them
- Location: South Africa
Jump height question.
The wiki says that the jump height in normal gravity is value*8.
Considering the default value is 8, why is it you can't get onto a platform 64 units higher than where you are standing?
I'm guessing I could just create a new player class and change the player.jumpz value to 9 if I wanted a player to be able to jump onto crates, or whatever else, with a height of 64, but I'd like to know how this works first.
Considering the default value is 8, why is it you can't get onto a platform 64 units higher than where you are standing?
I'm guessing I could just create a new player class and change the player.jumpz value to 9 if I wanted a player to be able to jump onto crates, or whatever else, with a height of 64, but I'd like to know how this works first.
You aren't specifying the maximum height you reach during a jump. You're specifying how fast you push off from the ground. Once your feet leave the ground, you're immediately subject to gravity. If you want to know how high you'll go at a particular gravity level, you'll need to solve an equation. (And it's been too long since my math classes, so I can't think of what it would be.)
- Siggi
- Posts: 3288
- Joined: Sun Oct 03, 2004 8:57 am
- Preferred Pronouns: They/Them
- Location: South Africa
Yeah, I knew it was basically just a jump force.
I thought that maybe the calculation was working a little differently from what I had assumed, but I see now that it's as I had thought, exactly as I thought in fact.
In the back of my mind I was hoping it had been done is such a way that the height of the player at the apex of the jump could be easily calculated. All I can say is I've never liked physics.
Thanks for clearing that up.
I thought that maybe the calculation was working a little differently from what I had assumed, but I see now that it's as I had thought, exactly as I thought in fact.

In the back of my mind I was hoping it had been done is such a way that the height of the player at the apex of the jump could be easily calculated. All I can say is I've never liked physics.
Thanks for clearing that up.
Not quite a jump force. I think Randy means it's a jump velocity.
If you care to dabble in this, you can use the following relationship:
V^2=2gh
This is "V squared" equals two times the acceleration of gravity times height. For example, if you drop from a height of 10 feet (h = 10') at the earth gravity of 32.2 feet per second squared, your velocity will be a bit more than 25 feet per second.
You can use this also to solve for how high something will go when given an initial velocity upward. In this case you will have V and g, and solve for h. Of course air resistance is being neglected.
Don't forget that to jump up on a crate 64 units high, you need only jump 40 units high as you can step up 24 units.
If you care to dabble in this, you can use the following relationship:
V^2=2gh
This is "V squared" equals two times the acceleration of gravity times height. For example, if you drop from a height of 10 feet (h = 10') at the earth gravity of 32.2 feet per second squared, your velocity will be a bit more than 25 feet per second.
You can use this also to solve for how high something will go when given an initial velocity upward. In this case you will have V and g, and solve for h. Of course air resistance is being neglected.
Don't forget that to jump up on a crate 64 units high, you need only jump 40 units high as you can step up 24 units.
- Siggi
- Posts: 3288
- Joined: Sun Oct 03, 2004 8:57 am
- Preferred Pronouns: They/Them
- Location: South Africa
I care to dabble.Biff wrote:If you care to dabble in this

If I were to assume that the acceleration of gravity in Doom were to be 0.8 map units per second squared (considering the gravity value is 800, this seems right to me), and the initial velocity of the player were 8 map units per second. Then I'd be left with (8)^2=2(0.8)h, which leaves the height equaling 40.
Now I know from experience in the game that you can't jump onto a crate 64 units high, so then does that mean that stepping in Doom does not apply when jumping? Well I guess we'll see. So let's for the sake of experimentation assume the initial velocity of the player were to be 9 map units per second. Then I'd get 50.625. Now from personal experience I know that works. So obviously something is wrong with the above calculation. If we assume stepping occurs, then both velocities should allow the player to get onto the crate, and if we assume stepping does not occur then neither should allow the player to get onto the crate, but we know only the second does.
However, I do feel that perhaps the gravity value of Doom being 800 is a little misleading. So lets now assume the gravity of Doom is in fact 1 map unit per second squared. In that case my calculation using an initial velocity of 8 map units per second would yield 32 map units, and my calculation using an initial velocity of 9 map units per seconds would yield 40.5.
Now once we've added the stepping effect into account, we'll see that the default player can only jump onto a crate with a height of 56 or less, and my super player will be able to jump onto a crate with a height of 64.5 or less. This is consistent with what I've seen in game.
So, purely for the sake of curiosity, am I correct? Or is something amiss here?

- Captain Ventris
- Posts: 4608
- Joined: Mon Jul 31, 2006 4:25 pm
- Location: San Antonio, TX
- Captain Ventris
- Posts: 4608
- Joined: Mon Jul 31, 2006 4:25 pm
- Location: San Antonio, TX
- Unknown_Assassin
- Posts: 2468
- Joined: Wed Apr 12, 2006 5:17 pm
- Location: Where dead carcasses lie
- Contact: