Randomness in games

Moderator
Posts: 1,562
Joined: 2003.10
Post: #1
I'd be interested to hear some perspectives on randomness as a gameplay element: When it makes the game more interesting, when it's harmful, pitfalls, ways to circumvent pitfalls, etc.

I've never been much of a fan of randomness in general. Waiting for a random number generator to hit a certain value before I can advance in a game or getting unrecoverably screwed over by some bad luck is an incredible frustration for me. I generally shy away from using randomness in my own games except where it either has little to no effect on gameplay, or no chance of making a particular task in the game either significantly more difficult or impossible.

For a game like Tetris, randomness adds a lot to the gameplay - in fact, the game could hardly work without it! However, the probability of getting a run of pieces that make the game impossible is extremely low (or is it zero? Seems like it might be, but I'll have to figure that one out...), so the gameplay becomes finding a way, any way, to deal with the randomness as it's dealt to you. I find this to be an ideal use of randomness.

Minesweeper almost works, but it's definitely more frustrating to me. The first click is completely random. and it's very possible (and probable) to get into a situation where there's no choice but to make a complete guess, frequently at a later stage in the game when you've already put a lot of work into solving the field. To me, this is a less-than-ideal use of randomness, though the gameplay wouldn't exactly work without it.

I'd like to hear some more thought and perspectives on this - what you've used randomness for in your own games, how well it worked out, what other games that use it have been particularly fun or frustrating because of it, and anything else relevant to the topic. Anyone?
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #2
In Soldier of Fortune 2, there is a random map generator which generates an entire map and placement of buildings and baddies. I guess the idea is that it was supposed to add more re-playability to the game. I didn't like it because it was too random. When it comes to first-person shooters, I like knowing the general location of where an NPC or group of NPC's will show up. I know that sounds dumb, but I like going through levels over and over again, perfecting the kills. But a certain amount of variation in those locations and number of NPC's is perfect.

Like for instance, right now I'm playing Rainbow Six Vegas, and there is this co-op feature called Terrorist Hunt, where you and up to three other friends hunt down a certain number of terrorists in a given map. It is highly addictive. At first, you don't know exactly when or where the terrorists will spawn, but after a while you find the patterns and the triggers to get them to spawn sort-of where you can expect them. So there's randomness mixed with predictability. The need for true randomness is not necessary at all in this case.
Quote this message in a reply
Member
Posts: 67
Joined: 2006.06
Post: #3
Ever seen wesnoth? Its quite a fun game but there is a massive element of randomness in it. Units sit on terrain types where they have %s as their defense.
When something attacks they both get a certain number of swings, if the enemy units defence is 60, attackers attacks have a 40% chance of landing.

Elves get huge %s on trees dwarfs on hills/mountains ect. There are ways to counterbalance it with magic (always at least 70% chance to hit) and poison which can force units to move off favorable terrian to go heal.

The game itself is fine because of the countermeasures like poison and magic, and the more skilled player will win 99% of the time. But it discourages new players keeping their community small. People who arent good at using the counter measures or good at patients cant comprehend that the game is nearly 100% balanced. And it hurts new style gameplay, which mainly consists of flinging units at eachother till one player wins.

So if its going to have a large element of randomness, it needs to have clear as day ways to counter luck, that both good and new players can see easily.

In wesnoth an example of how the luck counter is not appealing to newer players is: say one player is elf and has 4 70% defended archers in some forrests. The newer player will look at his mage and see its always got a 70% CTH (chance to hit) and use it against the elfs int he woods, fail to kill anything and get massacred because the mage was standing in sand which gives enemies a 80% CTH.
All the counters to luck in the game are extremly expensive, and have to be protected at all costs, which automatically makes them much harder to use. So new players get the hard deal again. The wesnoth community rarly seems to grow, since new players abandon the game instantly when a good player crushes them by apprent luck.

So if your going to have lots of luck in your game make sure its as clear as day how to counter it, or make it obvious that luck is not at fault for losses. It cant be the blazing centerfold of a combat system, even if it is second to skill.

I think that all made sense.



Edit: Now that ive squeezed a coherent thought out of my head. Where did your fox avatar go? I disapprove!

The machine does not run without the coin.
Quote this message in a reply
Member
Posts: 338
Joined: 2004.07
Post: #4
The absolute worst use of randomness that I have ever had the misfortune to suffer through is creating a character in Gemstone 3. Gemstone 3 is a text-based MMORPG. When you create a character you have to "roll" your stats. You will get 10 random numbers which you can then assign to your stats, BUT, you can re-roll those 10 numbers as many times as you want. What people ended up doing (myself included) was sit there rerolling for HOURS until you got a set of stats that was high enough to satisfy. Sometimes, after a few hours, you would get sick of it, stop rerolling, and just try again the next day. Awful.

A close second? Final Fantasy IV, pink tail. Someone shoot me in the head.

However, there are times when unbalancing randomness is fun- take Worms. The initial placement of the worms, and the spawning of weapon crates and what those crates contain can be completely unbalancing, but the fact that anything could happen is what makes it fun.

In my games so far, I've used randomness quite a bit. In KDC/Kill Monty, the doors that are chosen for spawns is random, which is essential to the gameplay. The dropping of powerups/1ups is also random, but balanced- I wanted an element of randomness to it, but not to the point of screwing the player. So instead of, say, awarding a 1up every 1,000,000 points, I award one every 500,000 to 1,500,000 points. Over time, it's about one life every million, but it makes earning your 1ups a little more exciting.

Also consider Poker, which is a game where the randomness allows anyone to pick it up and beat a fool 50% of the time, and a professional poker player 49% of the time. But that 1% advantage for the pro allows the pro to win over time.

Justin Ficarrotta
http://www.justinfic.com
"It is better to be The Man than to work for The Man." - Alexander Seropian
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
JustinFic Wrote:The absolute worst use of randomness that I have ever had the misfortune to suffer through is creating a character in Gemstone 3. Gemstone 3 is a text-based MMORPG. When you create a character you have to "roll" your stats. You will get 10 random numbers which you can then assign to your stats, BUT, you can re-roll those 10 numbers as many times as you want. What people ended up doing (myself included) was sit there rerolling for HOURS until you got a set of stats that was high enough to satisfy. Sometimes, after a few hours, you would get sick of it, stop rerolling, and just try again the next day. Awful.

Obsessive-compulsive_disorder LOL

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Member
Posts: 74
Joined: 2003.08
Post: #6
I often think about introducing randomness into games. It's a great tool, but can be missused easily.

Many games i like benefit from randomness, but most of the time its not the obvious parts that are random.
For example in a turn based RPG you might fight a monster, killing it with 4 blows. That'd be quite repetitive. But if you introduce some randomness, you'll need between 2 and 6 blows to kill it which can (if done correctly) increase the playbility.
Of course the exact same application of random numbers can kill the fun for the player. If the game has many of the same monster in a room , and you vary the killing like above, it might be that the exact same room could be very easy to complete (boring) or kill the player (way too hard).
I also see this kind of randomness applied in a way of "everyone is doing it, so it must be good for our game too", like in the player character creation mentioned above.

As i like to write stories as well as games, i also would like to make random stories, but i've not yet mastered the skill of easily assembling one. Normally you'd need massive amounts of premade content, to generate an interactive story (like in those old adventure books). In addition much of that content wouldn't even be seen by a one time playtrough.
I thought about atomizing the tellings to a very low level, and then create a kind of parser to make a story out of it, but as usual i didn't try to make it yet.
Another problem is, when you randomly string a story together, it can be bland pretty easily, like in these RPG's in which you have to either resque a daughter, or kill a rouge, or trade something. Of course these "Story elements" are random, but random(3) gets boring pretty quickly (at least to me, some of these game have a huge success, to my great bafflement).

Randomness can also raise its head in pretty strange parts of a game. For Example when you play an online game with strangers: You'll knever know how good your opponents or allies are.
Actually to me, Humans are extremely random, not only strangers, but also good friends. You just have to throw them into a complex enough system like chess. You can play games of chess with the same opponent for a very long time, before it gets predictable. Wink
This reminds me of multiplayer StarCraft: If you joined a game by someone there was always the random "game" of compatibility: Was the game wrongly titled? Would i be able to download the map? Would one of the players drop during the countdown? Would someone drop after the game started? And finally: would someone leave right after he saw his start base?

Basically if you want to surprise someone in your game, a randomized part is a pretty easy way to do it. But you'll have to look out that you don't randomize something for the sake of randomness. Or put differently: Randomness is not a design goal in itself, it's only usefull if it's implemented to increase the fun (And even then: Ones random fun is anothers random nuisance).
Quote this message in a reply
Moderator
Posts: 683
Joined: 2002.11
Post: #7
I usually write my super-short contest games with randomly-generated levels most of the time, and the long-term ones with predefined levels. But it really shouldn't matter, depending on what you want.

For example, Nethack's levels are almost entirely random. Halo, on the other hand, has almost no randomness whatsoever, even down to individual enemy movements. (It's almost like a Choose-Your-Own-Adventure novel, or a GameMaker game, just really fast, because you know how that Elite will move if you shoot him in certain places.)

My web site - Games, music, Python stuff
Quote this message in a reply
Moderator
Posts: 771
Joined: 2003.04
Post: #8
For my uDG entry (2003?) I ran out of time to implement a good AI, so the enemies behavior ended up being:
1. The enemy is placed at a random point in the map.
2. Once there, it selects one of four possible behaviors at random (each with different probabilities):
- Shoot at the player for a random amount of time, then repeat (2)
- Taunt the player for a random amount of time, then repeat (2)
- Run towards the player for a random amount of time or until it reaches a minimum distance, then repeat (2)
- Run to a random location on the map, then repeat (2)
3. If the enemy is shot, immediately select a new behavior

So, how did all that "advanced" *cough*lazy*cough* AI turn out?
I got good graphics & audio scores... and only average gameplay scores, in the mid position among all entries, but it was the lowest score in my entry.

But, here is the funny thing: My brother played with it for a few minutes, and gave up saying "It's not realistic. The enemies are too smart, they always send a few to distract me and then others attack me from the back..."
Grin

I guess the game AI is as much in the algorithms as it is in the player's head. Smile
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #9
PowerMacX Wrote:But, here is the funny thing: My brother played with it for a few minutes, and gave up saying "It's not realistic. The enemies are too smart, they always send a few to distract me and then others attack me from the back..."
Grin

I guess the game AI is as much in the algorithms as it is in the player's head. Smile
That is really interesting! It just helps confirm yet again that video games are nothing but smoke and mirrors when it comes right down to it. Was that Okugai? I don't remember the name, sorry. If it was, I had zero idea that the AI wasn't even basically state dependent.
Quote this message in a reply
Moderator
Posts: 771
Joined: 2003.04
Post: #10
Yep, Okugai.
Quote this message in a reply
Member
Posts: 715
Joined: 2003.04
Post: #11
JustinFic Wrote:The absolute worst use of randomness that I have ever had the misfortune to suffer through is creating a character in Gemstone 3. Gemstone 3 is a text-based MMORPG. When you create a character you have to "roll" your stats. You will get 10 random numbers which you can then assign to your stats, BUT, you can re-roll those 10 numbers as many times as you want. What people ended up doing (myself included) was sit there rerolling for HOURS until you got a set of stats that was high enough to satisfy. Sometimes, after a few hours, you would get sick of it, stop rerolling, and just try again the next day. Awful.


That is freakin hilarious. Sad and pathetic but hilarious.

The player character creation usign randoms comes from old paper and pen role playing, not necessarily "its the thing to do 'cause its cool!". Its the developers trying to satisfy their target audience that would end up asking for that feature
as well satisfying their inner nerd.

Currently I'm making a flying shooter and right now the planes are all flying on a single path, but I randomize the points of the path that they are targeting at the start of the level and each time they complete a loop of the path.

This keeps them from all cramming into each other, not very effectively but for the moment its good enough before I add more paths, which they will choose at random after completing a cycle.

I also randomize their decision to shoot the player, like a 10% chance, otherwise they are going insane all firing as soon as the player gets into range, half the time cutting each other to shreds.

We also used randoms in Antack for the computer attacks, it would pick a random base to fire at from one to six and send a host of missiles/ants at it.

A random level generator sounds awesome, I've actually implemented something like that a few times, badly. The last time I turned randomness on with our cube tool, instant city skyline maker, fun fun.
Quote this message in a reply
Moderator
Posts: 373
Joined: 2006.08
Post: #12
Personally, I think that randomness is the future for many games (MMORPGs in particular). When I refer to randomness, I mean a sort of 'weighted' randomness where, for instance, an NPC makes a decision based partly on some pre-defined values, and partly on a randomly generated number. I hear many game programmers/designers saying that they can not enjoy playing the games that they have made; while this may be true, I think that randomness would be a good fix for this...if events are random enough, there will be enough new possibilities (that are fresh and exciting, if programmed properly) to make even the game designer/programmer or a experienced gamer have fun while playing the game.
On the opposite end of the spectrum, I, too, have suffered from extreme randomness; it is not fun if, every other time you play a level, a swarm of monsters kills you off almost instantly because their stats ended up being randomly generated too extremely (of course, it's not much fun if they are too easy to kill, also).
I've often wondered about the question that you asked...looking forward to some more good replies Smile
-wyrmmage

Worlds at War (Current Project) - http://www.awkward-games.com/forum/
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #13
wyrmmage Wrote:Personally, I think that randomness is the future for many games (MMORPGs in particular). When I refer to randomness, I mean a sort of 'weighted' randomness where, for instance, an NPC makes a decision based partly on some pre-defined values, and partly on a randomly generated number.

Ive got a choice to make between two things, A massively complicated system of cogs and springs move and I come up with a descision.

You throw a couple of dice and they roll around knock off the sides of the table and eventually stop moving with some orientation.

In both situations its generally a lot better to model it statistically as opposed to modelling the process in a more kinematic/physical way.
The weights you mention come form statistical analysis (and I dont mean data sampling, although that could be part of it).

So, what makes you think the future is to continue to model things in this simplified way, as we have done for years?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 373
Joined: 2006.08
Post: #14
well, that wasn't exactly what I meant; obviously if we could "grow" our worlds by making them out of atoms, that would (sometimes) make more realistic worlds, however, that is a long way off, it would seem, and are not some things still 'random' to us? Even if we could model everything about the world that we still know, we would still have to make some things random because we do not know how they work.
Of course, there may be other ways to create more interesting and/or realistic games, I just meant that, for many games that I have played, carefully placed chance would have made them much more enjoyable Smile
-wyrmmage

Worlds at War (Current Project) - http://www.awkward-games.com/forum/
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #15
What wyrmmage seems to be looking for is "fuzzy logic". It is an extension of state machine AI, where the AI can be in multiple states at once, but it is not fully in each state, and decisions are based on a weighted average of the current states, or on probabilistic sampling.
Quote this message in a reply
Post Reply