Hit resolution
Moderator: Forum Moderators
Hit resolution
Hey, all. Love Wesnoth, but must say it's TOO HARD, and that comes from someone who's been playing games for a while..
Had a specific question for you folks, though. If I attack a unit, and it says hit chance is 40%, there are no further modifications to that chance, correct? If that's true, then I'm wondering if the random number generation isn't somehow screwed up. I've been noticing that my hits don't seem to average out as they should. For instance, I'm playing a scenario currently, and just missed 12 times in a row (with different attackers) with a 40% hit chance. There's only a 0.2% chance of that occurring (60% ^ 12). Is the seed perhaps being regenerated on every hit or somesuch?
All in all, love the game. It's just TOO HARD! (About ready to quit, or start cheating!)
Thanx,
BRiaN
Had a specific question for you folks, though. If I attack a unit, and it says hit chance is 40%, there are no further modifications to that chance, correct? If that's true, then I'm wondering if the random number generation isn't somehow screwed up. I've been noticing that my hits don't seem to average out as they should. For instance, I'm playing a scenario currently, and just missed 12 times in a row (with different attackers) with a 40% hit chance. There's only a 0.2% chance of that occurring (60% ^ 12). Is the seed perhaps being regenerated on every hit or somesuch?
All in all, love the game. It's just TOO HARD! (About ready to quit, or start cheating!)
Thanx,
BRiaN
Wesnoth is a game that you can figure out in a couple of minutes but take months to master. It really is just practice. Even though simplicity is one of the supposed features of the game, there is a lot of factors to get a feel for terrain, time of day, and healing. These factors are not just flavoring for the game; they really spell the difference between winning and losing. If you go too fast your front line will get slaughtered. Things like those just take some time to master. You can also get practice with 1-player multiplayer games and cheat by save-loading. At least that way you can play through the scenarios.
If the attack dialog says you have x% chance to hit, then yes, you really do have that chance to hit.
The code in-game is equivalent to this:
Yes I realize that some implementations of rand() don't always produce truly random-looking sequences in the bottom bits, however for a game I think it is close enough to randomI to be indistinguishable from true randomness to a player.
I don't mean to sound patronizing, but humans do have a way of seeing patterns in randomness. Unless someone can show that rand() as used has serious issues, then we're not changing it.
As for the game being too hard, it possibly is. I plan to have a detailed look at the balance and difficulty of the campaigns before the 1.0 release. I welcome you and all users to be involved in this process.
David
The code in-game is equivalent to this:
Code: Select all
if((rand()%100) < chance_to_hit) {
...hits...
}
I don't mean to sound patronizing, but humans do have a way of seeing patterns in randomness. Unless someone can show that rand() as used has serious issues, then we're not changing it.
As for the game being too hard, it possibly is. I plan to have a detailed look at the balance and difficulty of the campaigns before the 1.0 release. I welcome you and all users to be involved in this process.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
rand()%100 isn't completely random due to folding.
Lets say, rand() is completely random and produces numbers 0-255. (yeah i know its range is different).
Now, 0-255%100 produces 0 3 times (0,100,200), but produces 56 only 2 times (56, 156).
40% = 0-39, 100-139, 200-239 = 3*40 = 120 out of 256
120/256 = 46%
The man page for rand() explicitly mentions not using low order bits.
Lets say, rand() is completely random and produces numbers 0-255. (yeah i know its range is different).
Now, 0-255%100 produces 0 3 times (0,100,200), but produces 56 only 2 times (56, 156).
40% = 0-39, 100-139, 200-239 = 3*40 = 120 out of 256
120/256 = 46%
The man page for rand() explicitly mentions not using low order bits.
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
It is REALLY just practice. In fact, Wesnoth is the ONLY non-action game I've ever played that more than a little practice was useful in. If you're ready to give up or start cheating, change to Hard mode. Sure, you may lose repeatedly, but you'll probably learn a lot faster. Then, you can switch back to Easy and win easily.scott wrote:Wesnoth is a game that you can figure out in a couple of minutes but take months to master. It really is just practice.
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
Sure, but the lowest range I know of is 0-65536. The difference due to folding is insubstantial.Ave wrote:rand()%100 isn't completely random due to folding.
See my post above, and in numerous posts elsewhere where I have said that I think this is relevant perhaps for cryptographic applications, but not for games. People (fmunoz, and others) have run analysis over the lower order bits on typical implementations and found them to be fine.Ave wrote: The man page for rand() explicitly mentions not using low order bits.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
-
- Retired Developer
- Posts: 2633
- Joined: March 22nd, 2004, 11:22 pm
- Location: An Earl's Roadstead
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
What? No probabilities are combined when calculating chance to hit.casueps wrote:Could it just be that he was trying to hit an elf in the forest or something like that? Being 40% a low probability, combined with a 70% probability of missing, i think it gives a chance of 12% to hit. That is more or less one hit in 10 attempts, so its not that odd that he missed 12 times.
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
Re: Hit resolution
Play the multiplayer mode. It will teach you a LOT! This game is not too hard on my opinion. Play against Miyo and you'll learn fast!sycophant wrote:Hey, all. Love Wesnoth, but must say it's TOO HARD, and that comes from someone who's been playing games for a while..
Had a specific question for you folks, though. If I attack a unit, and it says hit chance is 40%, there are no further modifications to that chance, correct? If that's true, then I'm wondering if the random number generation isn't somehow screwed up. I've been noticing that my hits don't seem to average out as they should. For instance, I'm playing a scenario currently, and just missed 12 times in a row (with different attackers) with a 40% hit chance. There's only a 0.2% chance of that occurring (60% ^ 12). Is the seed perhaps being regenerated on every hit or somesuch?
All in all, love the game. It's just TOO HARD! (About ready to quit, or start cheating!)
Thanx,
BRiaN
By the way Miyo, i'll take my revenge from LSM soon!
Aleksi.
Hey all,
Now I just registered to post a reply on this one...
I was worried about just the same, sycophant complains about.
I already figured out before, that the random number generator seems to be okay - at least as far as I dived in
However I am still getting "impossible" results.
You know - it is _really_ frustrating to have your lvl3 Elf taken out by two lvl2 Orcs in one round while he's standing in the forest, just because the Orcs hit _every_single_time_!
Now due to the subject this is of course not really very "objective" - I can however say, that, having a seemingly perfectly save unit killed, due to bad luck, is a pain in the ass for the player - regardless of the overall campaign-difficulty.
Well - I don't just want to complain - so here come my proposials:
- Showing "luck/bad luck" - statistics would really help in getting this issue a more concrete basis
- If the random numbers are correct, I would suggest to change the damage calculations in some future release. Exact hit-rates for example might be an idea (that is: 50% means I will get exactly one half of my blows placed on the target).
Hmm... gotta leave now.
I _really_ hope this issue will be addressed, as, apart from that, Wesnoth is a really great game.
CU
Cyberfrag
Now I just registered to post a reply on this one...
I was worried about just the same, sycophant complains about.
I already figured out before, that the random number generator seems to be okay - at least as far as I dived in
However I am still getting "impossible" results.
You know - it is _really_ frustrating to have your lvl3 Elf taken out by two lvl2 Orcs in one round while he's standing in the forest, just because the Orcs hit _every_single_time_!
Now due to the subject this is of course not really very "objective" - I can however say, that, having a seemingly perfectly save unit killed, due to bad luck, is a pain in the ass for the player - regardless of the overall campaign-difficulty.
Well - I don't just want to complain - so here come my proposials:
- Showing "luck/bad luck" - statistics would really help in getting this issue a more concrete basis
- If the random numbers are correct, I would suggest to change the damage calculations in some future release. Exact hit-rates for example might be an idea (that is: 50% means I will get exactly one half of my blows placed on the target).
Hmm... gotta leave now.
I _really_ hope this issue will be addressed, as, apart from that, Wesnoth is a really great game.
CU
Cyberfrag
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
No, he compared it to chess. Othello stole the description!Slesh wrote:I think he just compared Wesnoth to Othello (Reversi). Death!Wesnoth is a game that you can figure out in a couple of minutes but take months to master.
Comparing it to chess is much better, since chess is a fellow game of war. Othello is a game of confuse-the-player-because-he's-not-used-to-the-rules, that's all.
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.