This is topic Hit/miss determination (quick question/theory) in forum Research Lab at The Azure Heights Forum.

To visit this topic, use this URL:;f=1;t=001229

Posted by Uiru (Member # 437) on 07-23-2002, 09:46 PM:
The current way to determine whether an attack hits or not is a number being higher/lower (whichever) out of 255, correct? Dynamicpunch and Zap Cannon, for example, are supposed to have 50% accuracy, but everyone knows both moves can go on 'streaks' of four or five hits or misses in a row. This might be due to the way there are 127 'hit' possibilities and 128 'miss' possibilities all grouped together. Numbers taken purely at random could be 10, 20, 25, 37 and 80; all of which would have the same result in this system- it either hits above the line or below it. Nothing (as far as I'm aware) ensures that half the time, the attack hits and half the time, the attack misses. Over a large enough number of trials, it eventually gets close to 50/50, and that is that.

What I want to know is; would changing to a system that breaks up the clumps of possibilities lead to a slightly 'more random' result? Say, for 50% accurate moves, all the odd numbers between 1 and 255 resulted in a miss and all the even numbers resulted in a hit. And with 80% moves, every multiple of 5 would be a miss. Would this make any difference at all?

This would probably shag up evasion modifiers, but they can be dealt with later.
Posted by spunman (Member # 1181) on 07-23-2002, 11:19 PM:
mathematically, no. as long as half of the numbers hit and half miss, the probability of hitting with a random number is going to be 50%. it doesn't matter which numbers make up either half, or whether or not they're adjacent to each other.
Posted by Fluorine (Member # 2904) on 07-24-2002, 10:03 AM:
The distribution of numbers probably won't change anything. The reason why there's streaks like that is that maybe the formula used to get random numbers isn't random enough [Razz]

What you could do to break streaks, but that'd be a bitch to do, would be to alternate percentages. For example, the first use of dynamicpunch has an accuracy of 75%, then the second has an accuracy of 25%, etc. Globally, it's 50% chance per hit, but streaks are not likely to happen... that would work, but that's not really worth shit, because it's way too difficult comparatively to the benefits.

Another thing would be to give each attack and each effect a "luck value" and modify accuracy depending on that value. The higher it is, the less accurate the move becomes, etc. That way streaks would be broken, and 00ber luck would never happen. And it's not difficult to do. I want to make a game using that, but I'm a little too lazy to get moving ._.

Karpe Diem