Skye Veran
New member
- Joined
- Jul 17, 2014
- Messages
- 2
Hi there! I'm 24 years old and currently off-and-on working on programming a video game as a side project. It's been quite a while since I've had a math class and, though I've been able to dredge up most of what I need in terms of programming calculations, this one is eluding me.
Basically I need to know the probability of a given action over a number of frames (a "frame" is a time period of 1/60th of a second, the fixed step in which a game is processed) with a given percentage per frame of the action being initiated.
As an example:
EnemyA has a 3% chance to initiate an attack each frame. Over 60 frames, what is the percent chance that it will initiate this attack?
I can guess 3/100 and 60 are used, but I can't figure out how to properly use them in this situation. Multiplying 3/100 by 60 seems (very) incorrect, and I just don't know how to work out the numbers otherwise.
Any help highly appreciated, preferably with the most efficient way of solving this so I can do it quickly for future calculations. Thanks! =)
Basically I need to know the probability of a given action over a number of frames (a "frame" is a time period of 1/60th of a second, the fixed step in which a game is processed) with a given percentage per frame of the action being initiated.
As an example:
EnemyA has a 3% chance to initiate an attack each frame. Over 60 frames, what is the percent chance that it will initiate this attack?
I can guess 3/100 and 60 are used, but I can't figure out how to properly use them in this situation. Multiplying 3/100 by 60 seems (very) incorrect, and I just don't know how to work out the numbers otherwise.
Any help highly appreciated, preferably with the most efficient way of solving this so I can do it quickly for future calculations. Thanks! =)