I'm developing a game that needs to calculate a 10% chance over a second of shooting against the player. The problem is, this calc is run every frame at a 60 frame rate.
So I need the individual percentage of each frame, that could reach the 10% after 60 frames.
I tried => 1/10/60 = 0.166% on each frame, but this doesn't work well.
How to do it?
You want it on average to shoot every sixth frame, so that's a $1/6$th probability per frame ($16.6\%$), not $0.166\%$.