Jump to content
  • Advertisement
Sign in to follow this  
DemonDar

Random skill activation in server based games

This topic is 516 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been reading somewhere (though I cannot find anymore the article) that some MMO games "cheat" when it comes to use "random chance", basically those games make sure that random skills do not get activated too often or to rarely by tweaking the real outcome chance according to how many times the skill failed to activate.
This is to prevent players frustration.

?I would be glad to find again that article, actually I tried to do the same, but since I'm rusty in statistics I failed to do that.

 

(well in reality it is irrelevant that the game is server-based). I just want to know how to tweak the frequency of success without altering the chance (so if you know that without citing an article you are wellcome :) ).

 

Edited by DemonDar

Share this post


Link to post
Share on other sites
Advertisement
I can't say I'm familiar with the article, but I do know that games (and not just MMOs) can and do structure their RNG in such a way that long chains of hits or misses or other frustrating behavior don't happen.

Imagine your character has a 90% chance to hit monster A. You take a swing, and roll a 3 (miss). You take a swing, roll a 2 (whiff). Take another swing, and by God wouldn't you know it, it's a 4. That's 3 misses in a row. Swing again, get a 6. According to the 'laws' of RNG, even though you have a 90% hit rate, it is perfectly possible to have such abysmally bad luck that you never actually hit.

One way of avoiding that is to use a pool of numbers, shuffled randomly. Each time you need a random number, you just grab the next number from the pool. If the pool is empty, re-shuffle it.

The way it works is you pick a pool size. 100 can work fairly well, or some other multiple of 100, especially if you use percentage-based roll determination. You create an array 100 elements long, and fill it with the numbers 0 to 99. Then you randomly shuffle it. Instead of drawing a random number directly from the random generator, you draw it from the pool. That means that in a string of 100 consecutive attacks, you will get exactly 10 misses and 90 hits, as expected with an attack success rate of 90%.

Other games might use slightly different systems than a pool. For example, the game Path of Exile uses a system that includes an 'entropy' counter which is randomized, then the attack percentage added to the counter and checked against 100. The entropy counter is re-randomized if it is the first time a player attacks the given enemy, or if an attack hasn't happened in more than 6 seconds. (See Evasion at the PoE wiki for a rundown of the system.) Though the mechanics are different, the idea is much the same: to prevent 'unlucky' strings of misses that can frustrate and annoy.

Note that it's not really 'cheating', per se, to use one of these techniques. As long as the actual percentages are preserved, it's still accurate.

Share this post


Link to post
Share on other sites

A pool of numbers is not a good solution. I should use a different pool for each different enemy and skill, and to tweak the % in a really fine way I should use a really big pool (10.000 numbers di per se is not a problem, but 10.000*enemies*skills it is).


?The entropy counter seems very interesting concept, I will check now it it alters also the chance and not only the frequency (actually I tried something similiar and don't worked very well). thanks :) I already played PathOFExile, very nice game.

?The way the etropy counter works generates a fixed sequence, I may tweak it a bit but actually it is not good (to me, in my opinion XD). In example assume that chance of hitting is 50.

?the counter is initialized to 64

?First shot:  64+50 => hit

Counter : 14

Second shot: 14+50 => miss

Counter : 64

Thirdshot:  64+40 => hit

Counter: 14

?In this case the sequence will Always be 1 hit, 1 miss,

?And i fear that changing:
?This:

 

float hittingChance = CalculateHittingChance();
entropy += hittingChance;

if(hittingChance > 100.0f)
{
    Hit();
    hittingChance -= 100.0f;
}
else
    Miss();

To this one:

 

float hittingChance = CalculateHittingChance()* Random(0.5f,1.5f);
entropy += hittingChance;

if(hittingChance > 100.0f)
{
    Hit();
    hittingChance -= 100.0f;
}
else
    Miss();

Will alter the final chance.

Edited by DemonDar

Share this post


Link to post
Share on other sites

, basically those games make sure that random skills do not get activated too often or to rarely by tweaking the real outcome chance according to how many times the skill failed to activate.
In traditional game design, this is a dice-based mechanic vs a card-based mechanic. A good game designer would know when to use each.

Dice give you pure chance, with the possibility of winning streaks and losing streaks. Cards let you put constraints on the possible length of a streak, the volatility, etc... And also let you revert to dice-style probabilities by telling the player to reshuffle the deck at certain moments.

What JT calls a pool is the same thing as a deck of cards :)

Share this post


Link to post
Share on other sites

Thanks I needed something half-way between those 2.

?Actually giving some randomization to the factor that gets added to entropy seems to do the job and get the best of both worlds.. Still struggling to tweak that value but I'm more close to the solution :).

 

Share this post


Link to post
Share on other sites

Note that it's not really 'cheating', per se, to use one of these techniques. As long as the actual percentages are preserved, it's still accurate.

 

One issue is that it's impossible to do both - given that you never know how many future tests there are going to be, you can never guarantee that whatever tweak you make to the current test isn't going to be the final one, and thus over- or under- state the true probability. For instance, in the Path of Exile entropy system (bad name, incidentally), there is a 0% chance that you can be hit 2 times in the first two attacks by someone with a 40% chance to hit, when a more correct value would be 16%. This matters if they only ever manage to have two attacks! These values converge to the right ones, given enough tests (c.f. the law of large numbers) but it will always skew low.

Share this post


Link to post
Share on other sites

There's also something to be said for eliminating randomness entirely.

 

For example, rather than the critical hit percentage common to many RPGs, in Heroes of the Storm they chose to have critical hits occur deterministically on every 3rd auto-attack. It removes the player frustration of missing out on crits they were expecting in the middle of an engagement, and makes DPS calculations quite a bit simpler.

 

Consider what real-world process you are trying to model with randomness, and whether it is actually achieving that end...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!