[No] Damage per distance

Moderator: Developers

Damage per distance

Postby Spottswoode » Tue Jan 17, 2012 9:44 pm

I suggest a weapon or projectile actor property that increases damage by n factor for every x distance. The general idea is to simulate more realistic ballistics damage from very long distances. It would look something like this,

DamageForce (2, 100) (factor, distance)

Meaning that for every 100 distance it traveled the damage would increase by 2x. Basically at a very long range the weapon or projectile would instakill many monsters and players but would substantially weaker at point blank range.
Conversely,
DamageForce (.5, 100)
This would cut the damage in half for every 100 distance the projectile travelled. Thus the weapon would be devastating at close range but do very little at mid to long range.
User avatar
Spottswoode
 
Joined: 17 Jan 2012

Re: Damage per distance

Postby XutaWoo » Wed Jan 18, 2012 1:44 am

I think time would be a better modifier than distance.

Also, it should just be DamageForce 2, 100 or DamageForce .5, 100. Parenthesis imply imply it's one value, although without much meaning considering there's nothing using the two numbers.
User avatar
XutaWoo
one day when going to see the rabbit, there was a previous visitor ...
 
Joined: 30 Dec 2006
Location: beautiful hills of those who are friends

Re: Damage per distance

Postby Spottswoode » Wed Jan 18, 2012 10:42 am

No, time is not a better modifier than distance because it cannot take projectile speed into account. Many weapons (like a custom railgun for instance) with high speeds would die before it could take effect. Velocity, in the formula for stopping power (MV)^2, implies speed with direction.
Time is probably more feasible than distance in programming, it is not a better descriptor under any realistic circumstance.

And on a much less important side note, technically it would be one value in physics.
User avatar
Spottswoode
 
Joined: 17 Jan 2012

Re: Damage per distance

Postby Gez » Wed Jan 18, 2012 10:56 am

Okay, why is it realistic that ballistic projectiles (i.e., not self-propelling objects) acquire more energy over distance? This seems highly counter-intuitive and I'd like to have an explanation for the physics involved.
Gez
 
Joined: 06 Jul 2007

Re: Damage per distance

Postby ChronoSeth » Wed Jan 18, 2012 1:36 pm

Gravity?
I don't know. But this is Doom. When has physics ever made sense within it?
User avatar
ChronoSeth
You are totally unique... just like everyone else.
 
Joined: 05 Jul 2010

Re: Damage per distance

Postby Graf Zahl » Wed Jan 18, 2012 4:18 pm

Gez wrote:Okay, why is it realistic that ballistic projectiles (i.e., not self-propelling objects) acquire more energy over distance? This seems highly counter-intuitive and I'd like to have an explanation for the physics involved.




Physically it's nonsense, plain and simple.

It's also not quite as easy to implement as it is written here and considering the limited appeal of something this weird, I take the easy solution...
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: Damage per distance

Postby Edward-san » Wed Jan 18, 2012 4:19 pm

ChronoSeth wrote:Gravity?

:nitpick:
Only in a planet without air and if you're shooting from higher z to lower z position (gravity is a conservative force btw).

Otherwise (still in the planet) ... air resistance, air resistance ... it will slow every projectile to a certain speed, which depends on the mass of the projectile and the air composition, because it compensates the gravity force.
Edward-san
Mathematics is the language with which God has written the universe. (Galilei)
 
Joined: 17 Oct 2009

Re: Damage per distance

Postby NeuralStunner » Wed Jan 18, 2012 4:25 pm

Heh, "more realistic".

Spottswoode wrote:No, time is not a better modifier than distance because it cannot take projectile speed into account.
Game logic runs per tic. Projectiles move Speed units per game tic. Unless your projectile speed is non-constant (due to in-state velocity modification), Distance = Speed * Lifetime-Tics. Even with varying velocity you can still add up travel distance each tic.

You can factor up current absolute velocity, and add/subtract to a user variable. (Decorate Expressions and A_SetUserVar will help you here.) Then, A_Explode can be used to deal the actual damage, with the modified damage value passed to it. (The projectile itself can be set to (0) damage.)
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

Re: Damage per distance

Postby ChronoSeth » Wed Jan 18, 2012 4:59 pm

Edward-san wrote:
ChronoSeth wrote:Gravity?

:nitpick:
Only in a planet without air and if you're shooting from higher z to lower z position (gravity is a conservative force btw).

Otherwise (still in the planet) ... air resistance, air resistance ... it will slow every projectile to a certain speed, which depends on the mass of the projectile and the air composition, because it compensates the gravity force.

Refer to the second line of my post. :P
User avatar
ChronoSeth
You are totally unique... just like everyone else.
 
Joined: 05 Jul 2010

Re: Damage per distance

Postby Edward-san » Wed Jan 18, 2012 6:32 pm

ChronoSeth wrote:Refer to the second line of my post. :P


ChronoSeth wrote:When has physics ever made sense within it?


Obviously Doom physics never made sense, but it doesn't mean zdoom should implement more nonsense physics properties (though I'd like to ask devs if in these years of development there are some of these).
Edward-san
Mathematics is the language with which God has written the universe. (Galilei)
 
Joined: 17 Oct 2009

Re: Damage per distance

Postby Spottswoode » Wed Jan 18, 2012 6:59 pm

Graf Zahl wrote:
Gez wrote:Okay, why is it realistic that ballistic projectiles (i.e., not self-propelling objects) acquire more energy over distance? This seems highly counter-intuitive and I'd like to have an explanation for the physics involved.




Physically it's nonsense, plain and simple.

It's also not quite as easy to implement as it is written here and considering the limited appeal of something this weird, I take the easy solution...

Hmm..no. It's real simple. Long range bullets (.408 Chey Tac for example) are fired in a parabolic trajectory to hit a target around the curvature of the earth with maximum impact. Wind speed, air temperature, and variable humidity also affect bullet trajectory. At 1 mile (or 1760 yards) a bullet travelling at close to Mach 3 generates enough energy to blow a human apart via hydrostatic shock. My example is a SIMPLIFICATION of said physics, as 1 mile in range is completely infeasible in map design with the current standards. Is my example a gross oversimplification? Absolutely. But as stated above, it's Doom and this was just a fleeting suggestion. I was well aware of the goofiness and odds of such a suggestion.
Oh yes, I also said time was more feasible than distance in programming. It's just not better for more accurate simulation.
Just something to think about. Christ. :|
User avatar
Spottswoode
 
Joined: 17 Jan 2012

Re: Damage per distance

Postby XutaWoo » Wed Jan 18, 2012 10:26 pm

...I'd still like easy damage falloff or rampup over time, considering how much hell it is to modifiy a projectile's damage. :P
User avatar
XutaWoo
one day when going to see the rabbit, there was a previous visitor ...
 
Joined: 30 Dec 2006
Location: beautiful hills of those who are friends

Re: Damage per distance

Postby wildweasel » Wed Jan 18, 2012 11:28 pm

Gez wrote:Okay, why is it realistic that ballistic projectiles (i.e., not self-propelling objects) acquire more energy over distance? This seems highly counter-intuitive and I'd like to have an explanation for the physics involved.

I've been told that the Gyrojet is a real-world gun whose projectile accelerates the longer it is in flight, thus theoretically doing more damage if it flies farther.
User avatar
wildweasel
...huh.
 
Joined: 15 Jul 2003
Location: Non-euclidean space

Re: Damage per distance

Postby Xaser » Wed Jan 18, 2012 11:31 pm

XutaWoo wrote:...I'd still like easy damage falloff or rampup over time, considering how much hell it is to modifiy a projectile's damage. :P

Why not suggest a feature to modify a projectile's damage value? That'd give all the flexibility one would really need.
User avatar
Xaser
secretly a supercomputer being a government
 
Joined: 20 Jul 2003
Location: .plɹoʍɹǝʌǝu.

Re: Damage per distance

Postby Spottswoode » Wed Jan 18, 2012 11:50 pm

Hmm..that would be considerably more flexible if it were an actor state or state change. It still doesn't fit quite the purpose I had in mind, but it could be worked around to some degree. I would really want to apply it to a railgun though.
User avatar
Spottswoode
 
Joined: 17 Jan 2012

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests