Author Topic: Faalingdamage-equation, and misc.  (Read 1540 times)

Lejon

  • Traveller
  • *
  • Posts: 21
    • View Profile
Faalingdamage-equation, and misc.
« on: November 03, 2004, 02:35:36 am »
I have noticed that ther was some question/discution about how the fallingdamage in CB work. And that I have no idea about.
However I will explain how a posible, realistic equation for that could look like.

The most importent factor to get out, is the falling speed, when the character hits ground.
In reality you get this from 3 factors.
Wher 2 of them is static.
The two static factors is:
1) Falling hight. (meters above ground)
2) Gravityacceleration. (on Earth, this varies about 9.80-9.82m/s?)

The \"non-static\" would be a force directed up, in opposit to the gravityacceleration.
All falling objects will accelerate untill the counterforce is equal to the gravityacceleration.

In reality the counterforce would be the \"friction of the atmosphare\".
Wich can be made higher buy for egsample a parisute.

Now to take the 3rd one in question in a computer game could be considered overkill.
This could insted be substituted by the effects of for egsample a levitate spell.

So a surgestion of how the equation could look, for CB would be:
(NOTE This is JUST a surgestion/guess. I have no idea what so ever how it actuly is)

Gravity-Acceleration*hight = fallingspeed-on-ground-hit

And to get the damage, you simply times that with a factor that seams good, in compaireson to the HP of a character in the game.

So an egsample could be:
A character with 1000hp falls from the hight of 10meters on the planet tellus with a gravityacceleration of 9.82m/s?

9.82*10*5 (wher the damagefactor would be 5, wher for egsample  an agility stat could decrees that factor)

That character then takes 491hp
and will then have 509 HP left.

Other factors could be an \"Safe-fall\"-skill, agility or whatever :)
A surgestion how ever would be that the agility-stat would counteract the hight, so that the higher agility you have the higher hight you can jump from without any damage.
For egsample:
An agility-stat of 150 would give a factor of 1.5 (1.50)
and would make so the character can jump form 1.5m hight with no damage as;
9.82*(1.5-1.5)=0
and as all know 0*any damage factor will be 0.

Some how I feel this description/surgestion has gotten close to the level of boring/overkill. But hey, I didnt have much to do.
And it also should shut atleast one question.


Also...
A would very much like a faction system in the game, but as I can see a form of such is already implemented, good work :)

Hmm, what more..

Oh yes.. please have patiense with my bad spell-ing, I am Out of Mana ;)
« Last Edit: November 03, 2004, 02:38:05 am by Lejon »
Im an EQ adict, that hopefully will be a PS adict, when thay finaly shut the EQ servers down.
(Blackleo @ Antonius Bayle)
PC (laptop): 2GHz P4m, 512 DDR RAM, GF2Go 32MB / 100% Linux.(Gentoo) / 1Mbit Cable.
(Thes bad language filters, WILL one day drive me CRAZY!)

Boldstorm

  • Hydlaa Notable
  • *
  • Posts: 525
    • View Profile
(No subject)
« Reply #1 on: November 03, 2004, 02:44:42 am »
The one problem I see with this is that falling damage doesn\'t work like this in real life. Damage is more on a curve then a straight line.

If you fall from 10 meters and it half kills you, it wouldn\'t take 20 meters to kill you but more like 15 meters (just using this as an example). Also I don\'t think a 5 meter fall would take 25% of your health since either.

I think falling damage needs to have more of an exponetial factor to it.

Lejon

  • Traveller
  • *
  • Posts: 21
    • View Profile
(No subject)
« Reply #2 on: November 03, 2004, 02:52:15 am »
Quote
Originally posted by Boldstorm
The one problem I see with this is that falling damage doesn\'t work like this in real life. Damage is more on a curve then a straight line.

If you fall from 10 meters and it half kills you, it wouldn\'t take 20 meters to kill you but more like 15 meters (just using this as an example). Also I don\'t think a 5 meter fall would take 25% of your health since either.

I think falling damage needs to have more of an exponetial factor to it.


I know my post got a litle messy, Im tired. But as I wrote in the later part.
Agility should counteract the hight.
9.82*(10*1.5)*5=417.35 dagame (hight = 10m agi = 150)
9.82*(5*1.5)*5=171.85 damage (hight = 5m agi = 150)
So it IS a curve, not a straight line.
as I said im OoM, so I was to slow to go back and chage it from the begining ;)
Im an EQ adict, that hopefully will be a PS adict, when thay finaly shut the EQ servers down.
(Blackleo @ Antonius Bayle)
PC (laptop): 2GHz P4m, 512 DDR RAM, GF2Go 32MB / 100% Linux.(Gentoo) / 1Mbit Cable.
(Thes bad language filters, WILL one day drive me CRAZY!)

Lejon

  • Traveller
  • *
  • Posts: 21
    • View Profile
(No subject)
« Reply #3 on: November 03, 2004, 02:56:20 am »
Quote
Originally posted by Lejon
Quote
Originally posted by Boldstorm
The one problem I see with this is that falling damage doesn\'t work like this in real life. Damage is more on a curve then a straight line.

If you fall from 10 meters and it half kills you, it wouldn\'t take 20 meters to kill you but more like 15 meters (just using this as an example). Also I don\'t think a 5 meter fall would take 25% of your health since either.

I think falling damage needs to have more of an exponetial factor to it.


I know my post got a litle messy, Im tired. But as I wrote in the later part.
Agility should counteract the hight.
9.82*(10*1.5)*5=417.35 dagame (hight = 10m agi = 150)
9.82*(5*1.5)*5=171.85 damage (hight = 5m agi = 150)
So it IS a curve, not a straight line.
as I said im OoM, so I was to slow to go back and chage it from the begining ;)


Error!
Yes your right sorry.. Have not sleeped for long..
Ofcourse it should be an exponentiol factor!
I think I need to rethink this to morrow..
Im an EQ adict, that hopefully will be a PS adict, when thay finaly shut the EQ servers down.
(Blackleo @ Antonius Bayle)
PC (laptop): 2GHz P4m, 512 DDR RAM, GF2Go 32MB / 100% Linux.(Gentoo) / 1Mbit Cable.
(Thes bad language filters, WILL one day drive me CRAZY!)

Lejon

  • Traveller
  • *
  • Posts: 21
    • View Profile
(No subject)
« Reply #4 on: November 03, 2004, 03:17:06 am »
Now this is not final, but somethime more like:
9.82*H(0.5H?-1.5?)
Wher H is Hight
and 0.5 is damage factor.

Quite ugly equation, but looks better on TI-graph, atleast..
Please DO comment!
Im an EQ adict, that hopefully will be a PS adict, when thay finaly shut the EQ servers down.
(Blackleo @ Antonius Bayle)
PC (laptop): 2GHz P4m, 512 DDR RAM, GF2Go 32MB / 100% Linux.(Gentoo) / 1Mbit Cable.
(Thes bad language filters, WILL one day drive me CRAZY!)

rorian

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
(No subject)
« Reply #5 on: November 03, 2004, 03:21:27 am »
You might also want to consider player level in the fall damage..   No level 1 player is going to think it\'s very fun when a 2m fall kills them, while a level 10 player only loses 2%hp..  so should it be normalized to a % of health?

I\'m quite sure that the fall-damage will have to be tweaked quite significantly.  What about sliding down slopes, or hitting a scrub halfway down a cliff?   Is damage calculated when you hit the scrub, then again when you hit the ground?   Does fall-height get reset when you hit the scrub?

Also, should there be a cap on maximum hp lost?   In DAoC, for instance, you would lose up to 99% from one fall (or, if the fall was extreme, 100%, but this required a huuuge falling distance), so it was still quite hard to die from one silly mistake.

Also, how would you train for ths \"safe-fall\" skill?   Jumping off ledges like a lemming?  :P

Lejon

  • Traveller
  • *
  • Posts: 21
    • View Profile
(No subject)
« Reply #6 on: November 03, 2004, 03:23:26 am »
Well ofcorse ther is also to consider that in real life, you dont have a set ponts of health..
I mean the is ppl that survived the parisute not extracting.
While ppl die form actuly falling down a litle stair..
It depends so much on what gets damage.
And for the server to calculate the damage for each critical organ, and so on.. would defenetly be overkill for a game.

I never clamed the \"damage factor\" to have anything to do with reality.

But the most important factor to take from reality IS the fallingspeed when u hit the ground.
But after ther is some work to do with the what the damage factor should be, and that can not be a static.
Im an EQ adict, that hopefully will be a PS adict, when thay finaly shut the EQ servers down.
(Blackleo @ Antonius Bayle)
PC (laptop): 2GHz P4m, 512 DDR RAM, GF2Go 32MB / 100% Linux.(Gentoo) / 1Mbit Cable.
(Thes bad language filters, WILL one day drive me CRAZY!)

Lejon

  • Traveller
  • *
  • Posts: 21
    • View Profile
(No subject)
« Reply #7 on: November 03, 2004, 03:33:10 am »
Quote
Originally posted by rorian
You might also want to consider player level in the fall damage..   No level 1 player is going to think it\'s very fun when a 2m fall kills them, while a level 10 player only loses 2%hp..  so should it be normalized to a % of health?

I\'m quite sure that the fall-damage will have to be tweaked quite significantly.  What about sliding down slopes, or hitting a scrub halfway down a cliff?   Is damage calculated when you hit the scrub, then again when you hit the ground?   Does fall-height get reset when you hit the scrub?

Also, should there be a cap on maximum hp lost?   In DAoC, for instance, you would lose up to 99% from one fall (or, if the fall was extreme, 100%, but this required a huuuge falling distance), so it was still quite hard to die from one silly mistake.

Also, how would you train for ths \"safe-fall\" skill?   Jumping off ledges like a lemming?  :P


Hmm.. now lets see... to have the fallingdamage be a %age of the HP is a good ide!

The \"Safe fall\" skill I took from EQ (wich I am a adict to) and yes, it actuly works like that to raise the skill, well and with a limited number of trainingpoints per level.
And it actuly works quite well I think.
And that the Safe fall is trained by falling is quite realistic to me.
As you would in reality would get experience on how to land safe, major by practising it. and a minor part would be knolage of how to fall safe as u lern in the sport Judo.

And what do u mean by Extrem fall?
It would seam quite strange to me, if a non experienced character didnt die from like a 30m fall. Unless he was very lucky.

And to calculate all surounding factors, would ofcourse make it more realistic. But somewher u need to draw the line.
Afterall, what is most important to use the server/PCs calculating power for?
Im an EQ adict, that hopefully will be a PS adict, when thay finaly shut the EQ servers down.
(Blackleo @ Antonius Bayle)
PC (laptop): 2GHz P4m, 512 DDR RAM, GF2Go 32MB / 100% Linux.(Gentoo) / 1Mbit Cable.
(Thes bad language filters, WILL one day drive me CRAZY!)

Lejon

  • Traveller
  • *
  • Posts: 21
    • View Profile
(No subject)
« Reply #8 on: November 03, 2004, 03:51:43 am »
Quote
Originally posted by Boldstorm
The one problem I see with this is that falling damage doesn\'t work like this in real life. Damage is more on a curve then a straight line.

If you fall from 10 meters and it half kills you, it wouldn\'t take 20 meters to kill you but more like 15 meters (just using this as an example). Also I don\'t think a 5 meter fall would take 25% of your health since either.

I think falling damage needs to have more of an exponetial factor to it.


On second though..
You can easy reach your \"goal\" of how much the damage outcome will be with a linare model, just that you dont make the angel on the line 45?.

Byt I still agree that a grade 2 or 3 equation would be a more realistic sulution, under the unrealistic surcomstanses that a RPG realy is.
But ther is still the question.
How much calculating power should you alow the fallingdamage to take?
Its not like only ONE person on the server will take fallingdamage at one moment. atleast not when the server gets populated enugh.
I am asuming that it needs to be a serverside sulution on ALL damage, to avoide thouse damn cheaters..
Im an EQ adict, that hopefully will be a PS adict, when thay finaly shut the EQ servers down.
(Blackleo @ Antonius Bayle)
PC (laptop): 2GHz P4m, 512 DDR RAM, GF2Go 32MB / 100% Linux.(Gentoo) / 1Mbit Cable.
(Thes bad language filters, WILL one day drive me CRAZY!)

rorian

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
(No subject)
« Reply #9 on: November 03, 2004, 04:04:44 am »
Man, I can just see training now..

Trainer: \"On your marks, get set, FALL!\"
*10 noobs jump off ledges like lemmings*
*9 noobs drink health pots, one goes to get ressurected*

Trainer: \"AGAIN!\"

Lejon

  • Traveller
  • *
  • Posts: 21
    • View Profile
(No subject)
« Reply #10 on: November 03, 2004, 04:13:54 am »
Quote
Originally posted by rorian
Man, I can just see training now..

Trainer: \"On your marks, get set, FALL!\"
*10 noobs jump off ledges like lemmings*
*9 noobs drink health pots, one goes to get ressurected*

Trainer: \"AGAIN!\"


ROTFLOL!

You have never played EQ have you?

It is suposed to be very hard to rais that skill!
You only get skillrais like one time in a 100 or 1000 falls in EQ.
Only that the \"cat-race\" starts the character with 50 in that skill for a reasson I think all can understand?
I play a such, that is now lvl 51 (70 maxlvl) and I only have 51 in safe fall. How hard it even might be to believe, that system actuly works..
And I see no reasson to neglect a working system, unless one has a better one.
Im an EQ adict, that hopefully will be a PS adict, when thay finaly shut the EQ servers down.
(Blackleo @ Antonius Bayle)
PC (laptop): 2GHz P4m, 512 DDR RAM, GF2Go 32MB / 100% Linux.(Gentoo) / 1Mbit Cable.
(Thes bad language filters, WILL one day drive me CRAZY!)

Altharion

  • Hydlaa Citizen
  • *
  • Posts: 450
    • View Profile
(No subject)
« Reply #11 on: November 03, 2004, 06:46:01 am »
stop posting three times in a row.

use the edit button and extend your post.

ArcaneFalcon

  • Hydlaa Notable
  • *
  • Posts: 591
  • ?
    • View Profile
(No subject)
« Reply #12 on: November 03, 2004, 08:32:42 am »
In real life you need 3 fundamental equations combined to get the answer to this.

First, you need the speed at which they are falling when they hit the ground.  For this we will use V2=root(2AD+V^2).  V2 is the final velocity, A is the acceleration due to gravity (9.8 m/s/s), D is the distance fallen, and V is the beginning velocity (in this case 0, so we can just drop that last +V^2).

Second, we need to take that final velocity (V2) and calculate the deceleration due to the ground.  A=(V2-V3)/T  where A is the deceleration, V2 is the velocity we got from equation 2, V3 is the final velocity (in this case 0) and T is time for deceleration (this is where agility can come in, lengthening the deceleration time and therefore decreasing the deceleration due to the ground).

Third, you will need the force from that final deceleration: Fnet=ma where Fnet is the total force (newtons), m is how much mass you have (in kg, affected by the race and whatever they are carrying) and a is the deceleration experienced by hitting the ground.  

The total damage can then be multiplied out from that final decelerating force (Fnet) according to whatever is deemed appropriate.  If you have played EQ then you know their damage system works exactly like this (the more you are carrying and the further you fall the more damage you get, though EQ assumes a constant deceleration time for everyone in equation 2).

:emerald:

Edit:  After subbing the formulas into one another the final formula for fall damage is:

Fnet=m((root(2AD)-v3)/T)

Where Fnet is the total force of the fall (used to calculate the fall damage), m is the mass of the character, A is acceleration due to gravity (9.8 ), D is the distance fallen, V3 is the final velocity (0), and T is the time taken for deceleration when hitting the ground.

:emerald:
« Last Edit: November 03, 2004, 08:46:36 am by ArcaneFalcon »

Adeli

  • Hydlaa Notable
  • *
  • Posts: 709
    • View Profile
(No subject)
« Reply #13 on: November 03, 2004, 04:26:13 pm »
Wow, you guys put a lot of thought into this, I suck at maths, so I\'ll take your word for it.
Altharion, that was annoying me too.
Lejon, stop double/triple posting, the mods won\'t like it.
« Last Edit: November 03, 2004, 04:26:27 pm by Adeli »

I like Red Jelly Beans!

Lejon

  • Traveller
  • *
  • Posts: 21
    • View Profile
(No subject)
« Reply #14 on: November 04, 2004, 01:21:22 am »
Very sorry about the repeated posts. Please excuse me.
I will not do it agin.

ArcaneFalcon, that was a very compleet explination :)
My fysics-math is a litle rusty to, so I thank you for that declaration, from wich I can see is correct.
And no, I didn\'t actuly not know that thats how thay actuly do it in EQ, as I mostly levitate when I jump. and I actuly didnt think thay would take such huge accuresy in calculating the fallingdamage in a game.
Im an EQ adict, that hopefully will be a PS adict, when thay finaly shut the EQ servers down.
(Blackleo @ Antonius Bayle)
PC (laptop): 2GHz P4m, 512 DDR RAM, GF2Go 32MB / 100% Linux.(Gentoo) / 1Mbit Cable.
(Thes bad language filters, WILL one day drive me CRAZY!)