They would have to create a variable and multiply it with another; not exactly NASA engineering there. Look at my post above.
AHEM: This cannot be coded
A point that deserves to be noted... Thanks badprenup for pointing this out... When a good suggestion is declined because it is too hard to code. Says who?
It's too hard to code? For you? For Notch? How do you know it's too hard to code? Do you have a masters degree in computer science? Do you create the JAVA interpreter for Oracle? Are you a professional video game designer whom can create a complete game in 1/2 a day? If you are none of the above, the complaint of "Too hard to code" is irrelevant and is seen as a really sloppy cop-out for when a good reason to decline cannot be made.
This thread's been resurrected, eh? I guess I can support this.
No it isn't.
I can do so right now.
/*The player object will be the player entity. It has a few variables to worry about.
Player.Health -- This is measured from 0 to 20 (10 hearts)
Player.Y_Initial
Player.Y_Final
Player.Y_Delta (the change from initial to final)*/
//The block object will be what the player lands on. It only has one variable to worry about.
//Block.Rigidity -- This is a floating point number that goes from 0.1 to 3, the lower, the less rigid the block. This can also be stored as a nibble from 1 to F with each value representing 0.1 to save on space, it's really not taxing as this is only called if the player changes Y (jumping or scaling) which is several orders of magnitude less frequent than lighting updates.
//Alternatively, you can simply use the block's existing ID and create a look-up table for rigidity and apply from the table (this really saves on space and performance).
//Example: Dirt has a value of 04; a simple document holding the values looks up 4 and returns a desired value; the bad part is the seek time for the LUT. This is a caveat of optimization; you can either save space or save time; you can't do both
/*Current formula. Player.Y_Delta=Player.Y_Initial - Player.Y_Final;
(Player.Y_Delta>3 ? Player.Health -= (Player.Y_Delta - 3):);
Above is a ternary operator. If Y_Delta is greater than 3, reduce player's health by Y_Delta-3.
*/
// Changing the formula
((Player.Y_Delta * Block.Rigidity) >3 ? Player.Health -= ((Player.Y_Delta * Block.Rigidity)) - 3):);
//We apply a block's rigidity to the fall distance. If the fall * rigidity is too high, then you take damage.
//Let's imagine that soil has a rigidity of 0.8; you would be able to fall 3.75m before taking damage. You set the rigidity to 0.5 and you have a 4.5m fall; the lower the value; the more you can fall at expanding rates.
/* Minimum distance to take damage, and first 3 damage breakpoints and (KILL DISTANCE)
1.5 = 2.00m, 2.66m, 3.33m, (15.3m)
1.4 = 2.14m, 2.85m, 3.57m, (16.4m)
1.3 = 2.31m, 3.08m, 3.85m, (17.7m)
1.2 = 2.50m, 3.33m, 4.16m, (19.2m)
1.1 = 2.72m, 3.64m, 4.55m, (20.9m)
1.0 = 3.00m, 4.00m, 5.00m, (23.0m)
0.9 = 3.33m, 4.44m, 5.55m, (25.5m)
0.8 = 3.75m, 5.00m, 6.25m, (28.8m)
0.7 = 4.28m, 5.71m, 7.14m, (32.9m)
0.6 = 5.00m, 6.67m, 8.33m, (38.3m)
0.5 = 6.00m, 8.00m, 10.0m, (46.0m)
0.4 = 7.50m, 10.0m, 12.5m, (57.5m)
0.3 = 10.0m, 13.3m, 16.7m, (76.7m)
0.2 = 15.0m, 20.0m, 25.0m, (115.m)
0.1 = 30.0m, 40.0m, 50.0m, (230.m)
Honestly, I expect the gradients to be from 0.6 to 1.2*/
Ugh, as usual, I spend more time commenting my code than I actually do code.
Also, even if would not be too easy to code (because they must change the "psyhics" system)
For the love of Notch! You can do it with the addition of a simple check and a quick change in a line of code, it's like I haven't even wrote anything. Am I on some kind of ignore list? Or is it merely prudence to disregard data if it completely compromises a cheap failed argument?
Order of operations of new fall system
1) Has the playable character (pPC) decreased in Y (fallen and landed)? We also record the distance fallen (pPC.Ydelta)
if (pPC.CurrentY<pPC.PreviousY)
{
pPC.Ydelta = pPC.CurrentY-pPC.PreviousY;
//step 2 goes in here
}
2) What has the player landed on? (check the rigidity value, this is the most straightforward way. Imagine Block Rigidity is a value from 1 to 16; rigidity of 8 would be dirt, rigidity of 10 would be stone. The block right below him is the block we want, so it's going to be at his location but one block below.
Since rigidity is used as a scalar to find the product; we convert it to a useful number. (from 0.1 to 1.6)
if (pPC.CurrentY<pPC.PreviousY)
{
pPC.Ydelta = pPC.CurrentY-pPC.PreviousY;
float Rigidity=0.1 * chunk(this).getRigid(pPC.CurrentX, pPC.CurrentZ, pPC.CurrentY-1);
//step 3 goes here
}
3) Multiply the distance fallen by the rigidity scalar. If the product (the fall damage) is less than 3, ignore it; otherwise reduce it by 3 and apply it to playable character's health (pPC.health). I'll be casting the value as an int which simply truncates decimal amounts. 3.1 = 3... 3.8 = 3... You simply chunk off the decimal portion and use what's left. Since health is measured from 0 to 20; we don't have to do crazy amounts of code magic to translate values into damage. 1 damage = 1/2 heart, 4 damage = 2 hearts, etc.
So what are you sayin' is that they have to add a line to calculate if the land block is the certain one enounced in the OP?
EDIT:Sorry for Double post. *facepalm*
No. This is going to be added to "for the critics". What I'm saying is what's written in my post. You don't need to infer or extrapolate. In a best case, it creates an unintentional strawman; in the worst case it's rude. In either case, it's wrong.
I'm saying to multiply your fall distance by the material you land on to see if the new value does damage. Then balance the fall mechanics off of the material's density.
They would have to create a variable and multiply it with another; not exactly NASA engineering there. Look at my post above.
AHEM: This cannot be coded
A point that deserves to be noted... Thanks badprenup for pointing this out... When a good suggestion is declined because it is too hard to code. Says who?
It's too hard to code? For you? For Notch? How do you know it's too hard to code? Do you have a masters degree in computer science? Do you create the JAVA interpreter for Oracle? Are you a professional video game designer whom can create a complete game in 1/2 a day? If you are none of the above, the complaint of "Too hard to code" is irrelevant and is seen as a really sloppy cop-out for when a good reason to decline cannot be made.
You don't need a master's degree to talk about something like this. But if you have no experience whatsoever, then stay away from that argument. Although if I remember correctly, only jeb and dinnerbone work on minecraft nowadays.
But pretty much anyone can say "they wouldn't do it because they're eating swine and drinking wine"
I'm pretty sure falling onto stone would be harder than falling onto wool. But, Minecraft has never been known for its realism. This would be a nice addition, though. SUPPORT!
You don't need a master's degree to talk about something like this. But if you have experience whatsoever, then stay away from that argument. Although if I remember correctly, only jeb and dinnerbone work on minecraft nowadays.
But pretty much anyone can say "they wouldn't do it because they're eating swine and drinking wine"
Of course not, but don't have the audacity to say "too hard to code" if you don't know.
I'm pretty sure falling onto stone would be harder than falling onto wool. But, Minecraft has never been known for its realism. This would be a nice addition, though. SUPPORT!
I hope mobs will also got the effect. Example :
Chickens will not flap its wings anymore to avoid fall damage after they fall from more than 5-7 blocks, making them fall normally and take the fall damage from the rest of the fall. Because it doesn't make any sense if they can avoid fall damage from 100 blocks high just by flapping its wings. Once they land, they receive 30% less damage because chickens are very light.
They would have to create a variable and multiply it with another; not exactly NASA engineering there. Look at my post above.
AHEM:
This cannot be coded
A point that deserves to be noted... Thanks badprenup for pointing this out... When a good suggestion is declined because it is too hard to code. Says who?
It's too hard to code? For you? For Notch? How do you know it's too hard to code? Do you have a masters degree in computer science? Do you create the JAVA interpreter for Oracle? Are you a professional video game designer whom can create a complete game in 1/2 a day? If you are none of the above, the complaint of "Too hard to code" is irrelevant and is seen as a really sloppy cop-out for when a good reason to decline cannot be made.
OFFICIAL POSTING/REPLYING GUIDELINES
UNOFFICIAL POSTING GUIDE (PRT)
UNOFFICIAL REPLYING GUIDE (FTC)
SkyChunk Survival!
SkyChunk Survival!
For the love of Notch! You can do it with the addition of a simple check and a quick change in a line of code, it's like I haven't even wrote anything. Am I on some kind of ignore list? Or is it merely prudence to disregard data if it completely compromises a cheap failed argument?
Order of operations of new fall system
1) Has the playable character (pPC) decreased in Y (fallen and landed)? We also record the distance fallen (pPC.Ydelta)
if (pPC.CurrentY<pPC.PreviousY)
{
pPC.Ydelta = pPC.CurrentY-pPC.PreviousY;
//step 2 goes in here
}
2) What has the player landed on? (check the rigidity value, this is the most straightforward way. Imagine Block Rigidity is a value from 1 to 16; rigidity of 8 would be dirt, rigidity of 10 would be stone. The block right below him is the block we want, so it's going to be at his location but one block below.
Since rigidity is used as a scalar to find the product; we convert it to a useful number. (from 0.1 to 1.6)
if (pPC.CurrentY<pPC.PreviousY)
{
pPC.Ydelta = pPC.CurrentY-pPC.PreviousY;
float Rigidity=0.1 * chunk(this).getRigid(pPC.CurrentX, pPC.CurrentZ, pPC.CurrentY-1);
//step 3 goes here
}
3) Multiply the distance fallen by the rigidity scalar. If the product (the fall damage) is less than 3, ignore it; otherwise reduce it by 3 and apply it to playable character's health (pPC.health). I'll be casting the value as an int which simply truncates decimal amounts. 3.1 = 3... 3.8 = 3... You simply chunk off the decimal portion and use what's left. Since health is measured from 0 to 20; we don't have to do crazy amounts of code magic to translate values into damage. 1 damage = 1/2 heart, 4 damage = 2 hearts, etc.
if (pPC.CurrentY<pPC.PreviousY)
{
pPC.Ydelta = pPC.CurrentY-pPC.PreviousY;
float Rigidity=0.1 * getBlockRigid(pPC.CurrentX, pPC.CurrentZ, pPC.CurrentY-1);
if((INT)pPC.Ydelta * Rigidity) < 3)
{
pPC.health -=(INT) (pPC.Ydelta*Rigidity - 3);
}
}
OFFICIAL POSTING/REPLYING GUIDELINES
UNOFFICIAL POSTING GUIDE (PRT)
UNOFFICIAL REPLYING GUIDE (FTC)
And ofcourse it's hard to code.. if you don't know how to code.
It would actually be quite easy to code..
I am a representative of Shockbyte.
It's OK. We all do thar sometimes...like spelling incorrectly.
~EpicS
I'm saying to multiply your fall distance by the material you land on to see if the new value does damage. Then balance the fall mechanics off of the material's density.
OFFICIAL POSTING/REPLYING GUIDELINES
UNOFFICIAL POSTING GUIDE (PRT)
UNOFFICIAL REPLYING GUIDE (FTC)
SkyChunk Survival!
You don't need a master's degree to talk about something like this. But if you have no experience whatsoever, then stay away from that argument. Although if I remember correctly, only jeb and dinnerbone work on minecraft nowadays.
But pretty much anyone can say "they wouldn't do it because they're eating swine and drinking wine"
OFFICIAL POSTING/REPLYING GUIDELINES
UNOFFICIAL POSTING GUIDE (PRT)
UNOFFICIAL REPLYING GUIDE (FTC)
Thanks!
SkyChunk Survival!
The Boys!
Chickens will not flap its wings anymore to avoid fall damage after they fall from more than 5-7 blocks, making them fall normally and take the fall damage from the rest of the fall. Because it doesn't make any sense if they can avoid fall damage from 100 blocks high just by flapping its wings. Once they land, they receive 30% less damage because chickens are very light.
SkyChunk Survival!
SkyChunk Survival!