[Math] Team Fortress 2: Choosing Between Two Weapons

arithmeticlimitsoptimization

Background:

In Team Fortress 2, there are two secondary weapons that the 'Heavy' class can choose between. I am trying to figure out what the best way to compare the two weapons mathematically is.

The first weapon is the default Shotgun. It shoots $1.6$ times per second, and has a clip size of $6$. For simplicity, let's assume that it does $60$ damage every time it hits.

The second weapon is called the Family Business. It shoots $15\%$ faster than the regular shotgun, so it shoots $1.84$ times per second. It has a clip size of $8$, and it does $15\%$ less damage than the regular shotgun, so that means it does $51$ damage every time it hits.

Finally, both weapons must be reloaded after their clips are emptied. It takes $3.5$ seconds for the regular shotgun to reload completely, and it takes $4.5$ seconds for the family business to reload completely.


My Calculations (so far):

The family business shoots $15\%$ faster and does $15\%$ less damage per shot.

$$1.15\cdot0.85 = 0.9775$$

So, ignoring clip sizes, the family business should intuitively do about $2.25\%$ less damage than the regular shotgun while both weapons are continuously firing (ignoring reloading times).

The shotgun takes $6/1.6=3.75$ seconds to empty its clip. The family business takes $8/1.84 \approx 4.35$ seconds to empty its clip. That means that if both weapons are shooting for less than or equal to $3.75$ seconds, then the family business should do $2.25\%$ less damage.


My Question:

Which of these two weapons has a greater average damage per second in an indefinitely prolonged battle? In other words, if $D_s(t)$ and $D_{fb}(t)$ are the damage done after $t$ seconds of continuous shooting by the shotgun and family business, respectively, then what is the value of this limit?

$$\lim_{t\to\infty} \frac{D_{fb}(t)}{D_{s}(t)}$$

The answer should represent ratio of the average damage per second of the family business to that of the regular shotgun, over an indefinitely long shootout.

I know the value for $t=3.75$.

$$\frac{D_{fb}(3.75)}{D_{s}(3.75)}=0.9775$$

Any help is appreciated, thank you!

Best Answer

Basically it sounds like you want the DPS rating for each gun assuming continuous firing. This obviously ignores lots of factors such as accuracy, burst damage, etc so take these calculations with all that considered.

What you need to calculate is the damage done for completely emptying and reload the gun versus the time it takes to fire those shots. The damage will simply be the clip size times the damage per shot. The time for one complete firing cycle will be the time to fire all those shots plus the reload time:

$$damage=clip\_size\times damage\_per\_shot$$ $$firing\_cycle\_time=clip\_size\div fire\_rate+reload\_time$$ $$DPS=\frac{clip\_size\times damage\_per\_shot}{clip\_size\div fire\_rate+reload\_time}$$

Regular Shotgun: damage: 100%, fire rate: 1.6/s, clip size: 6, reload time: 3.5

$$DPS=\frac{6\times100\%}{6\div 1.6+3.5}=0.83 \text{ (2dp)}$$

Family Business: damage 85%, fire rate: 1.84/s, clip size:8, reload time: 4.5

$$DPS=\frac{8\times85\%}{8\div 1.84+4.5}=0.77 \text{ (2dp)}$$

So on pure damage the regular shotgun is a little better (about 8% better). Other factors are probably however going to be more significant than this.

EDIT: To take into account a fixed probability of hitting each shot of $p$ the formula would become:

$$DPS=\frac{\color{red}{p}\times clip\_size\times damage\_per\_shot}{clip\_size\div fire\_rate+reload\_time}$$

This has no effect on the comparison of the two guns as missing shots reduced both guns by the same amount. If however you were about 8% more accurate with the Family Business then you would have basically the same DPS as the regular shotgun.

Related Question