Hacker News new | ask | show | jobs
by dylan604 910 days ago
I was once tasked with creating a DVD game that was meant to randomly pick questions from its available pool. Learned lots of things about how unrandom random can be. On the lower end of DVD players, there was a stored list of values between 0 and maxInt that was randomized when created. Each call of the random function would just move the pointer to the next item in the list. This meant that it would essentially play the questions in the same order every time. I can't remember the specifics if the list was reset when loading a disc or when the player was turned on.

Turns out, the company wanting the game got scarred of some patent that invoked the word random, so we had to reprogram the thing essentially do the same as that player. We had multiple sequences of randomized questions, and the game pick one of the sequences to play back in order when started.

1 comments

This reminds me of an mp3 CD player I had. I don't remember if the feature was called shuffle or random, but it played the same sequence of tracks every time. I could only fully enjoy it once per CD.
I had a CD player in my SUV that had the same problem. The only saving grace is that it could play mp3s from the CD, so I had mixes that had 100 songs on them.