Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A friend and I are trying to develop a “chance to dodge” formula that will scale from level 1-1000. I would like to see if one formula can be utilized, using a difference ratio between Character A’s level and Character B’s level. The factors involved in the equation are as follows:

Dexterity (Max 38)

Acrobatics Skill (up to 5 possible skill points)

The equation in theory:

(Acrobatics Skill * 5) + ((Dex - 10) * 0.1) + ((CharacterB's Level - CharacterA's Level) * 0.1)

The formula has been varied a little to make it work better in one regard which has the inverse effect of making it not work in another area. For example, the formula may work and scale well if a lvl 700 is striking at a lvl 1000. Let’s say that works out that Character B has a 65% to dodge. Sounds good…..except if the same formula is applied to a lvl 5 is striking a lvl 20 (low levels).

We don’t want there to be a 100% chance to block. Then again, I guess if a level 1 struck at a level 1000, that would be a little bit ridiculous that he would succeed. But once again, it would be nice if there was a way to scale the entire level spectrum by use of perhaps cosine and the difference-between-level’s ratio.

share|improve this question
Why are you multiplying dex - 10 by one? – Cameron Fredman Mar 14 '13 at 2:19
Meant to be a .1 – rpgguy Mar 14 '13 at 4:25
You have one thousand levels? Why? At that point, will anyone even notice going from level 88 to level 89? Are they going to particularly cherish or even remember when they hit level 123? At this point, you may as well be using a point-buy system rather than a level system. – Nicol Bolas Mar 14 '13 at 7:16
@NicolBolas Well, in Disgaea you can go up to level 9999, and do damage in the billions per hit. It is ridiculous, but quite fun. – David Gouveia Mar 14 '13 at 10:15
I'm not clear why you're factoring the level in at all. If you have two stats (acrobatics and dexterity) which affect chance to evade, presumably a character leveling has the opportunity to improve those stats. If they haven't or aren't, why should their evasion ability improve? – Cameron Fredman Mar 14 '13 at 17:48

there's easy formular, think easy :D

accurate = A.dex * 0.1;
evasion = B.dex * 0.05 - totalWeight(items)*0.5;
chance = ((accurate - evasion)/accurate)*100;
if(chance < 0)
     return miss;
else if(random(100) > chance)
     return miss;
     return hit;
share|improve this answer

Try using speed too. Just a suggestion:

(k1*attacker_speed + k2*attacker_dexterity) / (k3*target_acrobatics + k4*target_dexterity) * target_speed

k1, k2, k3 and k4 are values based on how much you want these values to increase depending on character level. I suggest you to change probabilities by using attack speed and range, changing it to:

(k1*attacker_speed + k2*attacker_dexterity) * attack_speed/attack_range / (k3*target_acrobatics + k4*target_dexterity) * target_speed

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.