-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\$

closed as off-topic by Martin Sojka, Kromster, MichaelHouse Apr 9 '15 at 14:03

  • This question does not appear to be about game development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    \$\begingroup\$ Too trivial to belong on the site. Also, a general programming question. \$\endgroup\$ – Martin Sojka Apr 9 '15 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 '15 at 10:14
  • 1
    \$\begingroup\$ This is basic, you should really learn maths. \$\endgroup\$ – Alexandre Vaillancourt Apr 9 '15 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 '15 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 '15 at 13:02
4
\$\begingroup\$

Why not this way? Much easier?

damagePerSecond = averageDamage * fireRatePerSecond * accuracy

Example:

damagePerSecond = 140 * 10 * 0.09

\$\endgroup\$
  • 1
    \$\begingroup\$ This implies that the values for the accuracy be stored as ratios instead of percentages. \$\endgroup\$ – Alexandre Vaillancourt Apr 9 '15 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 '15 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\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.