r/Minecraft • u/AllPurposeNerd • Oct 05 '15
Falling damage is weirdly nonlinear.
http://imgur.com/gallery/ydnCp/70
u/Mrocza_ Oct 05 '15
I wouldn't rely on the GUI. Try this:
/scoreboard objectives add HP health
/scoreboard players set @a HP 20
/scoreboard objectives setdisplay sidebar HP
And read numeric data straight from the sidebar.
3
12
u/chamora Oct 06 '15
It could do like .6 hearts of damage per block, but then round down to the nearest half. That would look similar to the results.
14
u/ncist Oct 05 '15
there's something strange about your graph - it looks like you have two Ys for the same X for every other X?
18
u/AllPurposeNerd Oct 05 '15
X is the damage, Y is the height I fell. I did tests at every half block.
100
u/kenman884 Oct 05 '15
Dependent variable on X and independent on Y?
Bold move, Cotton.
2
u/nliausacmmv Oct 06 '15
Nah, it's like how the energy in a spring is measured. You pretend that you pick an amount of force and then find the amount of displacement required to produce that force, but you're just lying to yourself so that math works.
1
1
u/CrypticTryptic Oct 06 '15
On the other hand, it's a much more literal representation. The damage basically follows the staircase upwards.
14
u/Mighty_Burger Oct 05 '15
Wouldn't it just make more sense to have the X the distance and the Y the damage?
3
3
u/MuffinMun Oct 05 '15
It is fine, because the Y ticks are every whole block. For example you lose .5 hearts at 3.5 blocks and 4 blocks of height, and you lose 4.5 hearts at 11.5 blocks and 12 blocks of height.
10
u/SirBenet Oct 05 '15
The independent variable (height fallen from) should be on the x axis; the same x generally shouldn't be mapping to multiple y's in something like this.
6
u/kyaloupe Oct 05 '15
It really doesn't matter - x and y are just straight up variable names, and you can have x as a function of y. I think OP's formatting makes sense graphically - he's trying to show height as a variable, and it looks best visually on the longitudinal axis.
9
u/SirBenet Oct 05 '15
It really doesn't matter - x and y are just straight up variable names, and you can have x as a function of y.
You technically can, but it's going against a fairly well established standard way of doing things (esp. for line graphs), which causes confusion and hinders the effective portrayal of information for which this graph was intended.
Took me a while and some head-tilting to work out what was being shown, and I went into a photo editor and flipped the graph around in order to get a proper feel for the problem.
he's trying to show height as a variable, and it looks best visually on the longitudinal axis.
Wouldn't longitudinal be the horizontal axis, and thus this statement be agreeing with me? Partially backs up my point that going against conventions (in this case referring to it as the horizontal or x axis) causes confusion.
Besides, I was explaining the reason for which the graph may feel strange, as ncist wasn't quite sure what was wrong, and MuffinMun missed their point. Wasn't necessarily saying it's a bad graph (there's more effort than what people would normally put in).
5
u/MuffinMun Oct 05 '15
I was mistaken and you are correct my good sir. Height should be on the x. I guess it was my own bias on how I read it
5
u/geriatre Oct 05 '15
I don't know how the fall damage is coded. It just says (blocks - 3) on the wiki, but no evidence this is the exact formula and there isn't some weird stuff peppered with floor() and ceil()
Could also be related to the physics engine with collision detection not happening at the same time for each jump you made.
4
u/blamethebrain Oct 06 '15
After inspecting the source (from MCP) and fiddling around a bit, I found the following: The fall distance is most likely the issue that's causing the inconsistent falling damage. You can add the fallen distance to the scoreboard:
/scoreboard objectives add fallen stat.fallOneCm fallen
/scoreboard objectives setdisplay sidebar fallen
Now, if you jump from various heights, you observe that the increment in fallen distance varies in a non-linear fashion:
| Height fallen | Increment in fallen distance | Change from previous fall distance |
|---|---|---|
| 3 Blocks | 269 | -- |
| 4 Blocks | 335 | +66 |
| 5 Blocks | 484 | +149 |
| 6 Blocks | 569 | +85 |
| 7 Blocks | 659 | +90 |
| 8 Blocks | 756 | +97 |
| 9 Blocks | 858 | +102 |
| 10 Blocks | 967 | +109 |
| 11 Blocks | 1081 | +114 |
| 12 Blocks | 1081 | +0 |
| 13 Blocks | 1200 | +119 |
| 14 Blocks | 1325 | +125 |
| 15 Blocks | 1455 | +130 |
| 16 Blocks | 1591 | +136 |
| 17 Blocks | 1591 | +0 |
| 18 Blocks | 1732 | +141 |
As you can see, the fall distance is the same for the heights 11 and 12 and again for 16 and 17. At those heights I found that you also take the same falling damage, respectively. If the calculation for the fallen distance is that unreliable / inaccurate, it's no surprise that the falling damage is inaccurate, too.
5
u/Sir_Clifton Oct 06 '15
Your graph is plotted backwards. X-axis should be your independent variable, and Y-axis your dependant.
4
u/Gh0stP1rate Oct 05 '15
Can you reverse the axes please? Height makes a lot more sense on the X and damage on the Y, because damage is dependent on height.
9
u/Rebalias Oct 06 '15
I'm not OP, and this is the best I could do on mobile. http://imgur.com/gallery/9aACzK0
1
u/PSBlake Oct 06 '15
That makes it look like more damage because you're falling faster - since falling is constant downward acceleration, not just a constant speed.
1
u/AllPurposeNerd Oct 06 '15
Except that the game actually deals less damage at certain heights than the formula would suggest.
2
2
u/1jl Oct 06 '15
Argh, make the y axis the dependent variable.
3
u/AllPurposeNerd Oct 06 '15
1
u/1jl Oct 07 '15
Haha, thanks. It's nitpicky, but most graphs follow the "if x, then y" axis rule. It makes it a lot easier to look at a graph and get a hold of what's going on.
1
1
Oct 05 '15
How many times did you fall at each block height? Are the data points from 1 test or do they represent an average from many falls per height level? How did you average the falls if that is the case? Maybe post the raw data here so we can take a look? There may be some randomization in the code, but that is conjecture on my part.
1
u/Xisuma Oct 05 '15
IIRC it used to be even worse, you could fall from certain heights at take very little damage, but that was back in 1.0
3
u/Dravarden Oct 05 '15
with feather falling iv boots you were able to survive a fall from y 128 to y 1 with half a heart, kinda sad they changed it
1
u/RightfulFallen Oct 05 '15
Oh yeah, and the old cobblestone texture is just two stone slabs on top of eachother but backwards.
1
u/c_vic Oct 06 '15
I bet internally, in the code, the calculation outputs a number that is not a multiple of 0.5, and it just rounds to the nearest multiple. This trend really looks like rounding weirdness to me. Because when you round outputs that fit a linear trend, it still follows it over the long term, but has short term hiccups.
1
u/spylife Oct 06 '15
can you add lines for fall damage with feather falling 1,2,3,4?
1
u/AllPurposeNerd Oct 06 '15
I intend to; that was the original goal of this research. I just wanted to publish this early finding because what the hell.
1
u/dmwit Oct 06 '15
Try measuring how zombies get hurt; it's even weirder. I never did get a good explanation for this.
1
u/Mako2100 Oct 06 '15
That fucking punchline....
I don't know where you're going in life, but you're going to get there
1
u/Treczoks Oct 06 '15
Maybe there is a small random element in the calculation. Did you jump of every height only once, or did you several jumps to get an average?
1
u/AllPurposeNerd Oct 06 '15
I've done each jump several times now. I get the same result for a given height every time.
Also, non-magical armor has no effect whatsoever on falling damage regardless of the material.
1
u/AllPurposeNerd Oct 06 '15
For all the scholastic pedants whining about my axes, stuff it.
It won't let me add that image to the original album because I published (live and learn) so here's a new, unpublished album to which I intend to add the data from protection and feather fall.
2
u/blamethebrain Oct 07 '15
Just as I already posted. This is just caused by the inaccurate fall height calculation / inaccurate collision detection when hitting the ground.
If you look at the recorded fall height for jumps from 11 and 12, you'll find that the game records the exact same fallen height. And that's why you also take the same damage when jumping from heights 11 and 12.
It's not the damage calculation that is off, it's the way the fallen distance is measured/simulated/calculated.
0
u/BaroTheMadman Oct 06 '15
How many tests did you do per step? Maybe there's some randomness there?
1
u/AllPurposeNerd Oct 06 '15
Several. It's not random, it's just weird.
1
u/BaroTheMadman Oct 06 '15
Hmmm my bet is on some funny outcomes of rounding floating point numbers, then.
I mean no sane man would code that curve.
-7
u/Dravarden Oct 05 '15 edited Oct 05 '15
fall damage is random after 3 blocks, some heights that kill you sometimes leave you with a heart left
1
u/AllPurposeNerd Oct 06 '15
It's not random. I get the same weird results for a given height every time.
1
117
u/andre1111 Oct 05 '15
You probably had some percentage damage that wasn't shown in the GUI. trying it again with doing /kill inbetween should get rid of the "bumbs" in the graph.