-4
\$\begingroup\$

I was wondering if anyone could help me establish a DPS equation using the variables 'Average Damage', 'Accuracy (%)', and 'Fire Rate Per Second'.

Here is my table:

Note: These numbers are examples only!

\$\endgroup\$
7
  • 3
    \$\begingroup\$ Too trivial to belong on the site. Also, a general programming question. \$\endgroup\$ Apr 9, 2015 at 10:13
  • 1
    \$\begingroup\$ I need to find a DPS using three variables at my own digression, i'm terrible at math so forgive my ignorance. I thought that this might work: Average Damage x Accuracy / FRPS \$\endgroup\$
    – goldfire47
    Apr 9, 2015 at 10:14
  • 1
    \$\begingroup\$ This is basic, you should really learn maths. \$\endgroup\$
    – Vaillancourt
    Apr 9, 2015 at 10:26
  • 2
    \$\begingroup\$ -1. This could probably be found out with basic "example problems". A damage per second of something with 2 average damage, 100% accuracy, and 1 fire rate per second would be 2 dps. That makes it pretty obvious that "average damage * (accuracy% / 100) * fire rate" = dps. As Alexandre Vaillancourt said, you should definitely learn more math(s), it's very important in programming and you're gonna want to know a lot of it. \$\endgroup\$
    – Superdoggy
    Apr 9, 2015 at 12:58
  • 1
    \$\begingroup\$ Also - a key to what type of question belongs here: will a game developer give you a different answer than say a mathematician, a physicist, or just a regular programmer? If not then it doesn't really belong, sorry. \$\endgroup\$
    – Superdoggy
    Apr 9, 2015 at 13:02

2 Answers 2

4
\$\begingroup\$

Why not this way? Much easier?

damagePerSecond = averageDamage * fireRatePerSecond * accuracy

Example:

damagePerSecond = 140 * 10 * 0.09

\$\endgroup\$
2
  • 1
    \$\begingroup\$ This implies that the values for the accuracy be stored as ratios instead of percentages. \$\endgroup\$
    – Vaillancourt
    Apr 9, 2015 at 11:13
  • \$\begingroup\$ Ratios and percentage are almost the same, the equation would become damagePerSecond = averageDamage * fireRatePerSecond * accuracy/100 with accuracy in % \$\endgroup\$
    – Heckel
    Apr 9, 2015 at 12:14
0
\$\begingroup\$

DPS = (total / rate) * accuracy;

so for shotgun:

damagePerShot = 140;
totalPerSec = damagePerShot * 10;
dps = (totalPerSec / 100) * 9;

so I figure average dps of 126 for a shotgun. Sound Good?

\$\endgroup\$
0

Not the answer you're looking for? Browse other questions tagged .