- Joined
- Jan 1, 2010
- Messages
- 197
This is a very basic and straightforward was to calculate DPS. You could use these formulas to create a DPS program if you wanted.
Let's start with some important assumptions
*Assume:
Now given this sample information:
Attack Cooldown= 0.75
Attack Damage Base= 9
Number of Dice= 1
Number of Sides per Die= 1
This is a very basic attack, that is guaranteed to deal 10-10 damage each attack.
Let's look at what we have so far:
We have a unit that does 1 attack every 0.75 seconds
That's 0.75 seconds per 1 attack or 3/4 seconds/attack.
But we need attacks per second for DPS calculation.
So that's attacks/second.
Notice how seconds/attackis the inverse of attacks/second.
So now we have to flip our fraction of 0.75/1 over to 1/0.75.
Do some math reduction:
1/0.75= 1/(3/4)= 1*4/3= 4/3 attacks/second
So guess how we get dps now?
Damage is reallydamage per attack ordamage/attack.
(damage/attack)*(attacks/second) do your cancellation and bada-bing bada-boom (damage/second)
So we're dealing 10 damage per attack.
So we need to take 10 damage * 4/3 attack/second
And watch the magic happen:
40/3 DPS!!!!
Do some long division and presto:
13.3333333--------->(goes on forever dog)
or 13 1/3 dps
Calculating Damage Actually Done in 2 seconds:
Take our previous problem, and let's say our unit lived for 2 seconds in a fight and was attacking the entirety of those 2 seconds.
To get the actual damage done, you'll need to multiple DPS*2
So:
4/3*10*2 right?
WRONG
To get the damage actually done, you need to take in account that it's impossible to complete a partial attack. IE, you cannot do 1/3 of an attack.
So 4/3*10*2 won't work
OMG DO WE GIVE UP?!
NO!
So we know that 4/3 attacks/second * 10 seconds will give us a fractional number of attacks, which is impossible, as you cannot complete a fractional amount of attacks.
So take 4/3 * 10 and get 13 and 1/3 attacks. You now have to drop the 1/3 to maintain correctness.
And:
4/3*10*2= 26 and 2/3
Where:
13*2= only 26.
Do you see how you're off by 2/3 if you don't account for this?
Minimum, Maximum, and Average DPS:
Now given this sample information:
Attack Cooldown= 0.75
Attack Damage Base= 9
Number of Dice= 1
Number of Sides per Die= 2
This gives us the same attack as above, except now with 10-11 damage.
You can find minimum DPS by using 10 as your damage value, then maximum DPS by using 11 as your damage value.
10 (damage/attack) * 4/3 (attack/second) = 13 1/3 minimum dps
11 (damage/attack) * 4/3 (attack/second)= 14 2/3 maximum dps
Now this is cool, but you'll probably confuse the user by displaying excessive numbers like this. You're best off taking the minimum and maximum dps and dividing them by 2, giving us the average dps.
13 1/3 + 14 2/3 = 28
28/2= 14 average dps <-------- display this to to the user, It'll make their life easier and yours too. It should reduce the questions like WTF IS THIS MIN AND MAX SHIT MAN!!!!!!
*These are all things that interrupt normal damage flow. If you use different armor types, evasion, and different armor amounts, you'll have to alter your dps calculation accordingly.
Let's start with some important assumptions
*Assume:
- Normal Attack/Armor Type
- No evasion
- No armor(defense= 0, damage reduction= 0%) or other damage reducing mediums
Now given this sample information:
Attack Cooldown= 0.75
Attack Damage Base= 9
Number of Dice= 1
Number of Sides per Die= 1
This is a very basic attack, that is guaranteed to deal 10-10 damage each attack.
Let's look at what we have so far:
We have a unit that does 1 attack every 0.75 seconds
That's 0.75 seconds per 1 attack or 3/4 seconds/attack.
But we need attacks per second for DPS calculation.
So that's attacks/second.
Notice how seconds/attackis the inverse of attacks/second.
So now we have to flip our fraction of 0.75/1 over to 1/0.75.
Do some math reduction:
1/0.75= 1/(3/4)= 1*4/3= 4/3 attacks/second
So guess how we get dps now?
Damage is reallydamage per attack ordamage/attack.
(damage/attack)*(attacks/second) do your cancellation and bada-bing bada-boom (damage/second)
So we're dealing 10 damage per attack.
So we need to take 10 damage * 4/3 attack/second
And watch the magic happen:
40/3 DPS!!!!
Do some long division and presto:
13.3333333--------->(goes on forever dog)
or 13 1/3 dps
Calculating Damage Actually Done in 2 seconds:
Take our previous problem, and let's say our unit lived for 2 seconds in a fight and was attacking the entirety of those 2 seconds.
To get the actual damage done, you'll need to multiple DPS*2
So:
4/3*10*2 right?
WRONG
To get the damage actually done, you need to take in account that it's impossible to complete a partial attack. IE, you cannot do 1/3 of an attack.
So 4/3*10*2 won't work
OMG DO WE GIVE UP?!
NO!
So we know that 4/3 attacks/second * 10 seconds will give us a fractional number of attacks, which is impossible, as you cannot complete a fractional amount of attacks.
So take 4/3 * 10 and get 13 and 1/3 attacks. You now have to drop the 1/3 to maintain correctness.
And:
4/3*10*2= 26 and 2/3
Where:
13*2= only 26.
Do you see how you're off by 2/3 if you don't account for this?
Minimum, Maximum, and Average DPS:
Now given this sample information:
Attack Cooldown= 0.75
Attack Damage Base= 9
Number of Dice= 1
Number of Sides per Die= 2
This gives us the same attack as above, except now with 10-11 damage.
You can find minimum DPS by using 10 as your damage value, then maximum DPS by using 11 as your damage value.
10 (damage/attack) * 4/3 (attack/second) = 13 1/3 minimum dps
11 (damage/attack) * 4/3 (attack/second)= 14 2/3 maximum dps
Now this is cool, but you'll probably confuse the user by displaying excessive numbers like this. You're best off taking the minimum and maximum dps and dividing them by 2, giving us the average dps.
13 1/3 + 14 2/3 = 28
28/2= 14 average dps <-------- display this to to the user, It'll make their life easier and yours too. It should reduce the questions like WTF IS THIS MIN AND MAX SHIT MAN!!!!!!
*These are all things that interrupt normal damage flow. If you use different armor types, evasion, and different armor amounts, you'll have to alter your dps calculation accordingly.
Last edited by a moderator: