MHB How to factor in critical chance to calculate damage per second?

  • Thread starter Thread starter Tomecide
  • Start date Start date
  • Tags Tags
    Damage Per
Click For Summary
SUMMARY

The discussion focuses on calculating damage per second (DPS) in a video game by factoring in critical chance. The established formula for DPS is: Attack Animations * Base Damage / Time to perform all attack animations. To incorporate critical chance, the expected damage is calculated as (1 + Critical Chance) * Base Damage, leading to the revised DPS formula: Attack Animations * (1 + Critical Chance) * Base Damage / Time. This method accurately reflects the impact of critical hits on overall damage output.

PREREQUISITES
  • Understanding of basic game mechanics related to damage calculation
  • Familiarity with probability concepts, specifically critical chance
  • Knowledge of mathematical formulas for damage per second (DPS)
  • Experience with game development or programming principles
NEXT STEPS
  • Research advanced damage calculation techniques in game design
  • Learn about probability distributions and their applications in gaming
  • Explore optimization strategies for game mechanics balancing
  • Investigate the implementation of critical hits in different game engines
USEFUL FOR

Game developers, mathematicians in game design, and anyone interested in optimizing combat mechanics in video games.

Tomecide
Messages
1
Reaction score
0
Ok so essentially in this video game I have there are certain stats on swords. The stats are the amount of Attack animations, amount of time to compleate all of the attack animations, sword dammage and critical chance. All of the animations deal the same amount of dammage and the time to compleate all of the animations always stays the same (Dammage is done when you attack and attacking causes an animation to happen). Critical Chance has a fixed percentage of chance to occour and if a critical hit is landed, the attack will deal double damage. Sword dammage is fixed and I've figured out a formula to find the amount of dammage a sword can deal a second: Attack Animations * Base dammage / Time to preform all of the attack animations. I'm confident that this formula is correct, because I have tested it. Anyways my question is how can I factor in critical chance to my equation to reresent the stat properly. Thanks!
 
Mathematics news on Phys.org
Tomecide said:
Ok so essentially in this video game I have there are certain stats on swords. The stats are the amount of Attack animations, amount of time to compleate all of the attack animations, sword dammage and critical chance. All of the animations deal the same amount of dammage and the time to compleate all of the animations always stays the same (Dammage is done when you attack and attacking causes an animation to happen). Critical Chance has a fixed percentage of chance to occour and if a critical hit is landed, the attack will deal double damage. Sword dammage is fixed and I've figured out a formula to find the amount of dammage a sword can deal a second: Attack Animations * Base dammage / Time to preform all of the attack animations. I'm confident that this formula is correct, because I have tested it. Anyways my question is how can I factor in critical chance to my equation to reresent the stat properly. Thanks!

Hi Tomecide! Welcome to MHB! (Smile)

When an animation deals damage, the damage dealt is:
\begin{cases}\text{Base Damage} &\text{with probability }1 - \text{Critical Chance} \\
\text{Base Damage} \times 2 &\text{with probability }\text{Critical Chance}
\end{cases}
The expected amount of damage is:
\begin{aligned}\text{Expected Damage} &= (1 - \text{Critical Chance}) \times \text{Base Damage} + \text{Critical Chance}\times \text{Base Damage} \times 2 \\
&= (1 + \text{Critical Chance})\times \text{Base Damage}
\end{aligned}
So the:
$$\text{Damage Per Second} = \text{Attack Animations} \times (1 + \text{Critical Chance})\times \text{Base Damage} \ /\ \text{Time}$$
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
12K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
11
Views
6K
Replies
11
Views
4K
  • · Replies 9 ·
Replies
9
Views
4K
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
7K
  • · Replies 0 ·
Replies
0
Views
2K
Replies
1
Views
5K
  • · Replies 29 ·
Replies
29
Views
7K