Predetermined/cached random

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Doros
Posts: 78
Joined: October 13th, 2004, 4:02 am
Location: USA

Predetermined/cached random

Post by Doros »

I was thinking that maybe it would be good idea to calculate the next bunch of random numbers in advance. Then they could be stored in save files. Effectively, this prevents save-loading to enchance your luck.

It's not that I have a problem with cheating. People will always cheat at one-player games when they want to, and that's not my problem. At the same time, it's so easy to cheat "just a little" right now that just about everybody does it, and it seems to have been accepted as part of the game, like an alternate strategy: "just reload." Because we're all so used to this crutch, I think it's harder to balance the game.

Personally, I also find that the game is much more fulfilling when you don't reload, but I often can't resist the temptation when I get frustrated, and Wesnoth is inevitably a frustrating game.

This could also be useful in playtesting. I don't remember exactly, but I think that the engine gets a random number between 0 and 100, and checks to see if it's less than or equal to your hit percent. If it is, it's a hit. I'm pretty sure it's either that or the other way around. Basically, it would be simple enough to create debug options "Run of bad luck" and "Run of good luck" that would fill your random buffer with low or high numbers.

Basically, I think this is the only way we'll ever find out if certain things are too hard, and I don't think reloading should be a required part of the game. I really can't imagine playing hard mode without it as it is now.
varradami
Posts: 43
Joined: April 12th, 2005, 6:41 pm

Re: Predetermined/cached random

Post by varradami »

Doros wrote:Personally, I also find that the game is much more fulfilling when you don't reload, but I often can't resist the temptation when I get frustrated, and Wesnoth is inevitably a frustrating game.
Reloading is not a required part of the game, and I don't think it's been accepted as part of the game; at least, I won't do it. As you say, it ruins the fun.

But I see no need to stop people from cheating. It doesn't hurt you at all. If you can't resist the temptation, that's your own problem. I don't seem to have any problem resisting it, and I'm struggling through medium difficulty - of course, I suck (at everything, not just Wesnoth), so that doesn't help.

As for playtesting, that's an easy one - if everyone is saying they can only beat the campaigns by cheating, they're not balanced. If there is a problem with a campaign, change the campaign, not the game.

What might be nice, however, is to change the probability curve. It is, I assume, flat at the moment. Turning it into a curve, so that the extremes are much more unlikely, might not be a bad idea. It would have a significant effect on the game though.
Invisible Philosopher
Posts: 873
Joined: July 4th, 2004, 9:14 pm
Location: My imagination
Contact:

Re: Predetermined/cached random

Post by Invisible Philosopher »

Doros wrote:I don't think reloading should be a required part of the game.
So you think a campaign should be reasonably winnable without reloading? (except of course when you're just quitting Wesnoth and coming back later) Even in Hard difficulty? It really depends on the skill of the player....

However what you say makes me think: it would be nice, for testing a campaign's balance (only), to have a "randomness smoothing" implementation, so you don't waste so much testing time with one side being excessively lucky.
Play a Silver Mage in the Wesvoid campaign.
Doros
Posts: 78
Joined: October 13th, 2004, 4:02 am
Location: USA

Re: Predetermined/cached random

Post by Doros »

varradami wrote:
Doros wrote:Personally, I also find that the game is much more fulfilling when you don't reload, but I often can't resist the temptation when I get frustrated, and Wesnoth is inevitably a frustrating game.
Reloading is not a required part of the game, and I don't think it's been accepted as part of the game; at least, I won't do it. As you say, it ruins the fun.

But I see no need to stop people from cheating. It doesn't hurt you at all. If you can't resist the temptation, that's your own problem. I don't seem to have any problem resisting it, and I'm struggling through medium difficulty - of course, I suck (at everything, not just Wesnoth), so that doesn't help.

As for playtesting, that's an easy one - if everyone is saying they can only beat the campaigns by cheating, they're not balanced. If there is a problem with a campaign, change the campaign, not the game.

What might be nice, however, is to change the probability curve. It is, I assume, flat at the moment. Turning it into a curve, so that the extremes are much more unlikely, might not be a bad idea. It would have a significant effect on the game though.
Maybe you never reload, but I think you're an exception to the rule. Many of the major players, including (I believe) EP and turin do reload, and every time the topic has come up, most people have said that they can't beat hard mode without reloading. I don't think it should be that common. Maybe it's not really "part of the game," but I still think that it should never be required, and we can't say it isn't until we all agree not to.

A patch was submitted a while back which prevented extremes. I forget exactly how it worked, but I believe it was designed to prevent streaks of bad luck. It was rejected, and I wouldn't have wanted it either. I want the odds to be exactly as they say they are - 70% is 70%. Hidden influences and handicaps have always bothered me in games. However, I think that many campaigns (in difficult mode) are too difficult with the current odds, and that's why people reload - it changes the odds.

The patch is relatively simple (if I have time this week, I'll code it myself), and there are a few benefits. It also begins to setup a framework for receiving random values from the server, instead of all clients generating their own.

This patch also does not eliminate a more valid use of reloading - if you make a mistake. I reload sometimes when I accidentally attack the wrong unit, or when I click by mistake when FoW is enabled.
Assasin
Posts: 956
Joined: March 15th, 2005, 3:51 am
Location: Where ever my mind takes me
Contact:

Post by Assasin »

I reload, you have to when you first play. Soon, I hope to get good enough so I won't have to reload, if that is possible.
I speak what's on my mind.

Which is why nothing I say makes sense.
varradami
Posts: 43
Joined: April 12th, 2005, 6:41 pm

Re: Predetermined/cached random

Post by varradami »

Doros wrote:Maybe you never reload, but I think you're an exception to the rule. Many of the major players, including (I believe) EP and turin do reload, and every time the topic has come up, most people have said that they can't beat hard mode without reloading. I don't think it should be that common. Maybe it's not really "part of the game," but I still think that it should never be required, and we can't say it isn't until we all agree not to.
If even expert players can not get through hard without needing to reload, then maybe hard is unbalanced. Eliminating the reload technique is the wrong solution, because it does nothing to solve the real problem. I suggest we spend our energy trying to figure out a solution to the underlying problem, not trying to stop the people who are breaking the rules to avoid the problem.

Caching random numbers won't really stop reloading anyway. In fact, it creates a whole new problem, since players may be able to take advantage of a knowledge of what those numbers will be like, and can manipulate events by taking actions in a different order.
I reload, you have to when you first play. Soon, I hope to get good enough so I won't have to reload, if that is possible.
I don't see why you need to reload. If you fail a scenario, or just do badly, restart it. There are plenty of scenarios I've had to play through multiple times. Hell, I started the campaign (HttT) over again because I was doing so poorly. I know it can be frustrating to get screwed by bad luck though.

I think part of the problem is that the campaign assumes that you're managing to build up a number of high level units. It can be rather unforgiving of losing those units, meaning that doing poorly in one scenario may have a domino effect.

A solution might be to vary the strength of the enemy based on the strength of the player. If the player has many powerful units to recall, let the enemy recall powerful units as well. If not, the enemy should not get as powerful units.

This problem is not unique to Wesnoth, but is quite problematic here. Over the weekend I was playing a little tabletop game called Pirates of the Spanish Main. It's a battle between sailing ships. I won largely due to luck - during one attack my oppenent failed all his rolls while I succeeded in mine - thus sinking his ship while mine were fine. The general solution to such problems is to design a game so that one spot of bad luck is unlikely to significantly affect the course of the game.
Invisible Philosopher wrote:So you think a campaign should be reasonably winnable without reloading? (except of course when you're just quitting Wesnoth and coming back later) Even in Hard difficulty? It really depends on the skill of the player....
In a word: YES! Are there really people who think differently? The game should be designed to accept that players will occasionally get unlucky. That's part of the game. If you're persistantly unlucky across a scenario, then of course you're likely to lose. But one bad turn should not normally screw you over. Of course, I play with the understanding that I may get a bad roll, but even still, HttT does seem prone to that problem.

I'm playing HttT on medium difficulty, and finding it fairly challenging, even though I'm not very far yet. Luck does play a bit larger role than I'd like. I would support changing random number generation has the middle numbers being much more likely than the extremes (which would probably require some rebalancing).
User avatar
Elvish_Pillager
Posts: 8129
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Re: Predetermined/cached random

Post by Elvish_Pillager »

varradami wrote:
Invisible Philosopher wrote:So you think a campaign should be reasonably winnable without reloading? (except of course when you're just quitting Wesnoth and coming back later) Even in Hard difficulty? It really depends on the skill of the player....
In a word: YES! Are there really people who think differently?
So, you think that even playing on Hard and getting unlucky shouldn't prevent you from winning the whole campaign in a single go?
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.
User avatar
drachefly
Posts: 308
Joined: March 23rd, 2005, 6:01 pm
Location: Philadelphia, PA

Post by drachefly »

Playing on hard and getting unlucky once shouldn't, no. And getting very lucky once shouldn't do it either.


Upon further reflection, I think the most basic solution would be to just double the number of attacks and, to compensate, double all units' HP and healing rates. This will greatly reduce the statistical likelihood of extreme runs.
Chances of getting 3 events in a row of 30% probability: 2.7%
Chances of getting 6 events in a row of 30% probability: 0.0729%

Chances of getting 3 events in a row of 70% probability: 34%
Chances of getting 6 events in a row of 70% probability: 11%

Main disadvantage:
charge and firststrike are weakened.
varradami
Posts: 43
Joined: April 12th, 2005, 6:41 pm

Post by varradami »

drachefly wrote:Playing on hard and getting unlucky once shouldn't, no. And getting very lucky once shouldn't do it either.
Yup, that's my opinion. It should be rare that one bit of luck, good or bad, is solely responsible for the outcome of even a single scenario, let alone a campaign. Of course, there are going to be exceptions... sometime there's just a key moment (like does the enemy's attack on Delfador hit, thus killing him), but these should be rare. I should be able to lose a unit without worrying that it will cripple me for the rest of the campaign.

Imagine if losing one hand in a game of poker screwed you for the rest of the game, so that you might as well quit right away. Sure, if you were betting your whole pot - but taking that kind of risk makes it your fault if you lose it all. Normally, you don't expect to win every hand. You're not going to get a straight or better every hand. Sometimes (a good number of times, in fact) you're going to get nothing. That's just part of the game.

I feel all well-designed games should follow that pattern. When you're rolling the dice (so to speak) many times, you have to assume that a few rolls are going to come up bad. The entire campaign should not normally hinge on one roll.

Of course, a string of bad luck will screw you, but that's the case in any game where luck is a factor.
User avatar
Elvish_Pillager
Posts: 8129
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

And here's another idea for a Wesnoth mod: On each turn, all the moves are computed before the attacks. You assign attacks, and then when you end turn, the attacks are executed concurrently. What's more, instead of a constant random chance, a 'deck' of random numbers is distributed among the units of each side. (This is similar to choosing a random half of the attacks, and making those attack hit and the rest miss, but chance to hit is also a factor.)

Of course, there would be some issues, like counterattacks. I'd make them work as they do now, countering against all their attackers if they survive, but that's really up to whoever wants to make this mod (which is probably no one.)
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.
Doros
Posts: 78
Joined: October 13th, 2004, 4:02 am
Location: USA

Re: Predetermined/cached random

Post by Doros »

varradami wrote:
Doros wrote:Maybe you never reload, but I think you're an exception to the rule. Many of the major players, including (I believe) EP and turin do reload, and every time the topic has come up, most people have said that they can't beat hard mode without reloading. I don't think it should be that common. Maybe it's not really "part of the game," but I still think that it should never be required, and we can't say it isn't until we all agree not to.
If even expert players can not get through hard without needing to reload, then maybe hard is unbalanced. Eliminating the reload technique is the wrong solution, because it does nothing to solve the real problem. I suggest we spend our energy trying to figure out a solution to the underlying problem, not trying to stop the people who are breaking the rules to avoid the problem.

Caching random numbers won't really stop reloading anyway. In fact, it creates a whole new problem, since players may be able to take advantage of a knowledge of what those numbers will be like, and can manipulate events by taking actions in a different order.
I agree that reloading is not the problem, but I think that it's impossible to make a balanced campaign when you're assuming that some people will reload. This change is very trivial, and I really can't see any argument against it, as, once it's finished, it doesn't require any maintenance.

It will stop reloading to improve your luck. You can't improve your luck if you get the same result every time. People will still find ways to cheat (you can just play in debug mode or manually edit your save files), but my point is that it's too easy to cheat now. Even worse, reloading is generally not considered cheating unless it's used "in excess." I think that Wesnoth is a great game, but I find it unfortunate that most players find playing the same turn 12 times to get the outcome you want to be an acceptable part of the game. A lot of people, some developers included, debate the negative effects of some of the luck-influenced elements of the game. I think it's hard for anyone to judge any of this when most of our players are not playing by luck in the first place.
Shade
Posts: 1111
Joined: April 18th, 2004, 11:17 pm

Re: Predetermined/cached random

Post by Shade »

Doros wrote:but I think that it's impossible to make a balanced campaign when you're assuming that some people will reload.
The simple solution is to test without reloading. That's what I do. Admittedly, I spend most of my time testing 'medium', but that means that I've played and won every scenario I twiddle with on 'medium' (at a minimum) before I unleash it on the world. (I allow myself the caveat that if 'a leader' of mine dies I'll reload, stuff happens)

I do have the advantage of knowing 'the intimates' of every scenario, but I hardly play Wesnoth like chess... I do pay attention to time of day and terrain, but I don't overthink and I 'play fast' so I tend to lose more units than I should... The simple way to balance a scenario is to play it a couple of times, and adjust it to leave you where you want to be when done.

Luck does tend to average out over the course of a scenario. The extent of this is that when I replay a given scenario (assuming I'm not changing strategies) I tend to complete a scenario in a +/- 2 round range. That a pretty tight range for 'such a random game' :)

This has been said on many occasions, and I'll repeat it. Anybody who has the desire to radically alter the dynamics of play in a 'non-Wesnothian' sort of way is both welcomed and encouraged to do so. Just don't expect it to go into CVS / mainline Wesnoth. Wesnoth is one game with one mode of play... There has never been any desire expressed by anybody with a CVS account and C++ skills (AFAIK) to change that.
Note to forum users: You are in a maze of twisty little passages
Doros
Posts: 78
Joined: October 13th, 2004, 4:02 am
Location: USA

Re: Predetermined/cached random

Post by Doros »

Shade wrote:
Doros wrote:but I think that it's impossible to make a balanced campaign when you're assuming that some people will reload.
The simple solution is to test without reloading. That's what I do. Admittedly, I spend most of my time testing 'medium', but that means that I've played and won every scenario I twiddle with on 'medium' (at a minimum) before I unleash it on the world. (I allow myself the caveat that if 'a leader' of mine dies I'll reload, stuff happens)

I do have the advantage of knowing 'the intimates' of every scenario, but I hardly play Wesnoth like chess... I do pay attention to time of day and terrain, but I don't overthink and I 'play fast' so I tend to lose more units than I should... The simple way to balance a scenario is to play it a couple of times, and adjust it to leave you where you want to be when done.

Luck does tend to average out over the course of a scenario. The extent of this is that when I replay a given scenario (assuming I'm not changing strategies) I tend to complete a scenario in a +/- 2 round range. That a pretty tight range for 'such a random game' :)

This has been said on many occasions, and I'll repeat it. Anybody who has the desire to radically alter the dynamics of play in a 'non-Wesnothian' sort of way is both welcomed and encouraged to do so. Just don't expect it to go into CVS / mainline Wesnoth. Wesnoth is one game with one mode of play... There has never been any desire expressed by anybody with a CVS account and C++ skills (AFAIK) to change that.
If what you say is true, then my proposal wouldn't change any of the dynamics of the game. If save-loading is not required to play Wesnoth, my changes would have no effect. However, I'm betting that if the ability to cheat this way was removed, there would be a lot of rebalancing, and I think that would benefit Wesnoth.
Axel
Posts: 9
Joined: April 5th, 2005, 6:28 am

Re: Predetermined/cached random

Post by Axel »

Doros wrote: I agree that reloading is not the problem, but I think that it's impossible to make a balanced campaign when you're assuming that some people will reload. This change is very trivial, and I really can't see any argument against it, as, once it's finished, it doesn't require any maintenance.

It will stop reloading to improve your luck. You can't improve your luck if you get the same result every time. People will still find ways to cheat (you can just play in debug mode or manually edit your save files), but my point is that it's too easy to cheat now. Even worse, reloading is generally not considered cheating unless it's used "in excess." I think that Wesnoth is a great game, but I find it unfortunate that most players find playing the same turn 12 times to get the outcome you want to be an acceptable part of the game. A lot of people, some developers included, debate the negative effects of some of the luck-influenced elements of the game. I think it's hard for anyone to judge any of this when most of our players are not playing by luck in the first place.
Doros you don´t seem to understand what several already have mentioned in this thread.. Pretermined Randoms will even enhance cheating trhough reloading.. So you try for the first time, and you fail, you know now, your 1st attack will succeed, the 2nd wont, the 3 wontm the 4th will succeed again. Now with this advanced knowledge the seconde time after reloading I can plan my attack very very accuratly by chaning the units that attack, and to integrate the faling attacks into the plan, for example for the 2nd and 3th attack, I attack some unimportant unit at the side, the succeeding attacks go into frontline.
Hermooz
Posts: 14
Joined: February 24th, 2005, 2:48 pm

Post by Hermooz »

Doros you don´t seem to understand what several already have mentioned in this thread.. Pretermined Randoms will even enhance cheating trhough reloading.. So you try for the first time, and you fail, you know now, your 1st attack will succeed, the 2nd wont, the 3 wontm the 4th will succeed again.
This is true. However, the "streak" of predetermined pseudo results should not be immutable. In the "Age of wonders" TBS series, if you try the "reloading" method to force your luck, you see that you get always the same result if you always make the same moves. That is, is perfectly pointless to reload and try the same attacks that got that superunit toasted; but if you reload, make some other attack with some other unit, and than try again with the superunit you could fare better.

I guess that programmatically, this means that there must be some fixed events in the game (a unit moves, or attacks another unit, whtever), that triggers a recomputation of the streak of pseudorandom results. So that if you get to "know" in advance a streak and try to use it to bend chances at your favor, you're out of luck (bad pun intended :lol: ) because it will be recalculated when you try to use it for some different action. However, if you save the game before sending Konrad against the yeti, you can't reload it and retry until you get a 100% on attack and a 0% on retaliation, since the outcome of the encounter it's decided BEFORE you save.

If you save, see that Konrad gets pounded, then you reload and try to attack the yeti FIRST with Delfador and then with Konrad, it's fine: you're learning, and you can have a different result.
--
Fabrizio "Hermooz" Ermini
Post Reply