Jump to content
  • Advertisement
Sign in to follow this  
AngleWyrm

Damage per Second vs Rate of Fire

This topic is 3713 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So we have three weapon models: A). 20 shots/sec at 5 dmg/shot = 100 dmg/sec. B). 10 shots/sec at 10 dmg/shot= 100 dmg/sec. C). 80 shots/sec at 1 dmg/shot = 80 dmg/sec. If I only had to choose between A and B, I would pick A, because it reduces the lost time and damage of a miss. But what about C?

Share this post


Link to post
Share on other sites
Advertisement
Those rates are pretty high, ranging from assault riffle rates to multibarrel AA gun. I wouldn't be much concerned with 50 ms of lost time when firing a gun, so I don't see a huge difference between A and B. I don't know what kind of a game you're thinking of, but C doesn't sound like a good option because of the reduced damage.

Share this post


Link to post
Share on other sites
I suppose it depends on how easy it is to hit the target, as well as how much damage a typical target can absorb.

However, since these are all fairly rapid, C clearly falls short. What is the probability of hitting the target with any individual shot? The average damage done over time by all of these will be just as proportionate over a length of time.

This is more important for slower weapons or relatively weak targets.

Let's change it up a little. Let's say you were given an option D:
D). 1 shot/sec at 1000 dmg/shot = 1000 dmg/sec

Obviously, this is a much more powerful weapon. Would you still use it or not? Why?

I don't know if you are using specific examples from your project, or if these are just out of your hat, so what is the expected damage threshold of a typical target?

Share this post


Link to post
Share on other sites
Here is the example, re-designed to be less abstract:

Assault Rifle: 10 shots/sec * 10 dmg/shot = 100 dmg/sec.
Sniper Rifle: 1 shot/sec * 100 dmg/shot= 100 dmg/sec.
Fictional Rifle: 85 shots/sec * 1 dmg/shot= 85 dmg/sec.

So far, I've tried modelling my idea of a miss as a portion of the shots fired. So maybe I guess that I hit 9 times out of 10 shots, which is to say 9 hits/10 shot:

shots/sec * dmg/hit * hits/shot = dmg/sec.

It does exactly what you would expect though, which is just scale the dmg/sec by whatever the hits/shot proportion is. If I expect 9 hits/10 shots then the dmg/sec is just 9/10 of what it used to be. Doesn't show a preference between the Assault Rifle and the Sniper Rifle -- which is what I'm after.

Share this post


Link to post
Share on other sites
Is ammunition unlimited and weightless? Because if it isn't, then you might not automatically pick the model with the most shots per second.

Share this post


Link to post
Share on other sites
Is there a reason you are only taking into account damage and rate of fire. The speed of the bullets leads to the ability to dodge. Things like spreadshot and accuracy seen in things like shotguns. Recoil and tons of things determine the difference between guns. Often you see firing modes also like single shot, burst, or full auto. Also you have the concept of maximum range or effective range.

You can't really model a gun correctly by looking at it's damage and fire rate. A sniper rifle for instance has high accuracy and long range and fast bullets making it's single shot (if it is single shot) bullet count for a lot more than a machine gun. Typically unless it's short range firing a perfect shot with a pistol or smaller weapons means leading a target maybe. I mean think about when you use a sniper and a pistol. Totally different combat. Not sure what this is for, but if players are at a far range and one has a sniper rifle and the other has a shotgun. If you just want to use something like fire rate and damage and not take into account anything else you might get odd results because both can fire at around the same interval. (just guessing).

You aren't seeing the difference because you aren't taking into account a weapons category of combat among other things. Clips size and a few other things can play into the equation.

Share this post


Link to post
Share on other sites
There are a virtually unlimited number of additional dimensions that can be tacked onto the problem -- which are being suggested because I have made the model less abstract. Thus we see why abstract is good, because people are easily distracted.

We could just as easily say this has to do with ship-mounted lasers, wizard's fireballs, and psyonic attacks that have nothing to do with guns at all.

The math problem is to measure the quality difference in the DPS, where the total is the same, but the rate of fire is different.

[Edited by - AngleWyrm on May 13, 2008 2:28:58 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by AngleWyrm
Here is the example, re-designed to be less abstract:

Assault Rifle: 10 shots/sec * 10 dmg/shot = 100 dmg/sec.
Sniper Rifle: 1 shot/sec * 100 dmg/shot= 100 dmg/sec.
Fictional Rifle: 85 shots/sec * 1 dmg/shot= 85 dmg/sec.

So far, I've tried modelling my idea of a miss as a portion of the shots fired. So maybe I guess that I hit 9 times out of 10 shots:

shots/sec * dmg/hit * hit/shot = dmg/sec.

It does exactly what you would expect though, which is just scale the dmg/sec by whatever the hits/shots proportion is. If I expect 9 hits/10 shots then the dmg/sec is just 9/10 of what it used to be. Doesn't show a preference between the Assault Rifle and the Sniper Rifle -- which is what I'm after.


Well, if your opponent takes a large amount of damage to kill, you can expect that to scale linearly.

The big difference in these weapons is the time it takes to aim, their chance of hitting the target when aimed, and the range that they operate at.

A sniper rifle takes longer to aim, but has a higher range, which is a good trade off. The assault and fictional rifles likely take less time to aim because you can walk your shots up to the target, and even if your aim is horrible, the spread of shots can work in your favor if you're off a little. I suppose at a range of 10 feet, I would take either of the first two, but farther away is where they distinguish themselves.

I can't honestly see why anyone would choose the fictional rifle, unless it had some other benefit to compensate for its weakness. Once the rate of fire gets high enough, it stops having a significant benefit. Imagine you had a laser that had a continuous beam of damage at 80 dmg/sec. Would it really be worth it? Maybe the fictional rifle takes less time to aim because walking provides more immediate feedback?

Let's assume that all these weapons have perfect aim, are in range, but the target moves suddenly and unpredictably every 1.3 seconds. It takes varying times to aim properly, for the assault rifle takes 0.3s, the sniper rifle 0.7s, and the fictional rifle 0.1s.

So starting with the sniper rifle, after 0.7s you take a shot, doing 100 damage. You can't fire again until 1.7s, but the target moves at 1.3s and you have to readjust your aim, firing at 2.0s for a total of 200 damage. Fortunately, for the sniper rifle, every shot should hit; every time the enemy moves, it takes 0.7s to aim again and fire. Since it takes 1.0s to be ready again, it will be ready 0.3s before you aim again next time.

To try and make this more generic, let's assign some variables:
D is damage per shot
f is the rate of fire
m is the rate at which the enemy suddenly jump
a is the time it takes to aim again

So the times at which the enemy moves will be:
tjump = n*m where n=(0,1,2,3,...)
That means the time at which you start landing shots is
tstart_shooting = n*m + a
and the time you can shoot until is:
tstop_shooting = (n+1)*m
So your total window to do damage is:
twindow = (n+1)*m - (n*m + a) = m-a

The number of times you can fire in this window is 1 + _(m-a)/f_ where the underscores represent the floor function.

This also assume a high rate of fire, like you have. If you had a slower gun, you would have to expand this so that the window interval was taken from (n-1)*m+a or earlier.

Either way, this should be enough to get you started on an estimation of how to figure this out. To make this more practical, you could assume that the time-to-aim is (rightly) proportional to the angular distance between where you are aiming and where the target is. Then you could assume that the target is making many rapid small jumps, and integrate.

Share this post


Link to post
Share on other sites
Some reasons I like your model:
* As a target recedes into the distance, their angular width diminishes, which can play into target acquisition time.
* Enemy evasive maneuvers become more significant at close range.
* It establishes a relationship between hunter and prey that is much clearer than a generic dice roll.
So yea, fun thanks.

Share this post


Link to post
Share on other sites
Let's look at the two extremes: A gun that shoots once per second and does 100 damage (enough to destroy the target), and a beam that fires continuously for 100 damage per second.

Assume a situation where you get one second long "shot opportunities" and you're missing 50% of the time. With the gun, you have 50% chance of kill with one shot, 75% with two, 87.5% with three etc and nothing happens when you miss. With the beam, you do 50 damage on the first pass and guaranteed kill on the second. Still, in a "gun vs beam" fight the gun will win (50% chance of survival - beam has 25% and both losing has 25% chance). If the base hit chance is lower, the beam may become more effective but I can't be bothered to crunch the numbers.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!