It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Here's an interesting one:

In the Game Boy Pokemon games, the division routine could handle only 8-bit divisions, but the damage formula has an Attack/Defense term in it, which could be a problem if either value would exceed 255.

Well, they did have a solution; if either value is > 255, the game divides both values by 4 (a simple bit shift operation) before actually doing the division. This allowed the game to function, though it did cause loss of precision. This, in turn, resulted in strange results if the defender has less than 4 defense:

In Gold/Silver/Crystal, 1 is used in place of defense. This has the strange behavior that the Pokemon will take *less* damage from an attacker with 256 Attack than from one with 255 Attack. (It would normally round down, but there is a reason the developers made a special case here.)

In Red/Green/Blue/Yellow, defense gets rounded down to 0. This is, of course, a very bad thing, as the game now tries to divide by 0. The result is a softlock, as the division never completes.
It was mentioned on another thread here a while ago, but I thought it was cool that racing games and/or some side-scrollers used a random number generator to draw the course rather than waste space in saving a pre-programmed course. The course would remain the same each time the game was played even though it was generated randomly (due to the RND reset or something technical.)
avatar
chadjenofsky: It was mentioned on another thread here a while ago, but I thought it was cool that racing games and/or some side-scrollers used a random number generator to draw the course rather than waste space in saving a pre-programmed course. The course would remain the same each time the game was played even though it was generated randomly (due to the RND reset or something technical.)
It's from using the same seed to initialize a pseudo-random number generator, which ensures you get the same random numbers each time. That's desirable in many uses where randomization is needed but where true random numbers are not only unnecessary but actually undesirable because you want something of a random nature that is repeatable.

https://en.wikipedia.org/wiki/Random_number_generation#.22True.22_vs._pseudo-random_numbers

Basically, there are different levels of "random" when it comes to random number generators in computers, some intentionally repeatable sequences (pseudo-random), and others true and/or cryptographically secure.
avatar
chadjenofsky: It was mentioned on another thread here a while ago, but I thought it was cool that racing games and/or some side-scrollers used a random number generator to draw the course rather than waste space in saving a pre-programmed course. The course would remain the same each time the game was played even though it was generated randomly (due to the RND reset or something technical.)
avatar
skeletonbow: It's from using the same seed to initialize a pseudo-random number generator, which ensures you get the same random numbers each time. That's desirable in many uses where randomization is needed but where true random numbers are not only unnecessary but actually undesirable because you want something of a random nature that is repeatable.

https://en.wikipedia.org/wiki/Random_number_generation#.22True.22_vs._pseudo-random_numbers

Basically, there are different levels of "random" when it comes to random number generators in computers, some intentionally repeatable sequences (pseudo-random), and others true and/or cryptographically secure.
I believe this sort of strategy is used in other procedurally generated games, such as The Elder Scrolls: Arena and No Man's Sky.

Interestingly, some games with random generation will actually tell you what seed you get, and will allow you to re-enter the seed on a subsequent playthrough if you want to play through the same world. Dungeon Hack, Minecraft, and (at least) some of the Randomizer ROM hack generators are like this.

I can think of a few other uses for repeatable random numbers. For example:
Pokemon: In a Link Cable battle (this may extend to online battles in later generations), each copy of the game needs to have the same idea of the game state. Hence, both cartridges will communicate to make sure they use the same random seed, resulting in both sides generating the same results for the battle. (Of course, the 1st generation games have a few bugs that can desync the battle anyway, possibly causing a player to appear to use glitch pokemon/moves until the game crashes.)

Speaking of which, Pokemon Crystal did something interesting: There are at least 2 battle programming bugs found in Gold/Silver that affect the way the battle plays out (Present does the wrong amount of damage, for example), but were fixed in Crystal. To avoid a desync when battling with Gold/Silver, during a link battle these bugs are *intentionally* emulated by Crystal; sometimes the "fixed" behavior is not what is desirable.

Another use for seeded RNG is replays; instead of storing the entire video, a replay need only store the initial random seed and the sequence of inputs used by the player(s). This way, the replay will play out exactly the same as the original play (assuming there isn't some bug that causes it to desync, of course).
avatar
dtgreene: I believe this sort of strategy is used in other procedurally generated games, such as The Elder Scrolls: Arena and No Man's Sky.

Interestingly, some games with random generation will actually tell you what seed you get, and will allow you to re-enter the seed on a subsequent playthrough if you want to play through the same world. Dungeon Hack, Minecraft, and (at least) some of the Randomizer ROM hack generators are like this.
...
Yep, Banished is another one where you can enter a seed IIRC.
avatar
skeletonbow: Yep, Banished is another one where you can enter a seed IIRC.
And Worms 2 and The Settlers. I actually remember writing down seeds that I thought had resulted in great levels back when I was a kid.
avatar
dtgreene: I believe this sort of strategy is used in other procedurally generated games, such as The Elder Scrolls: Arena and No Man's Sky.

Interestingly, some games with random generation will actually tell you what seed you get, and will allow you to re-enter the seed on a subsequent playthrough if you want to play through the same world. Dungeon Hack, Minecraft, and (at least) some of the Randomizer ROM hack generators are like this.
...
avatar
skeletonbow: Yep, Banished is another one where you can enter a seed IIRC.
I recall Akalabeth asks the user for a seed as well.