In gaming, randomness is often seen as both a blessing and a curse. On one hand, it can keep things exciting and unpredictable, ensuring that no two playthroughs are the same. On the other hand, it can frustrate players who feel that their success or failure is determined more by chance, rather than skill! But what if randomness itself could be harnessed to create a unique gaming experience?
In August, we hosted three sixth-form students here at Quantum Dice as part of our inaugural Work Shadowing Programme. I volunteered to be a “QD Buddy” – a role that saw me mentor Tom Gardiner, a brilliant student with an interest in computer science. Together we discussed projects he could work on that would demonstrate the use of Quantum Dice’s Quantum Random Number Generator (QRNG). We decided it would be interesting to create a maze game powered by Quantum Random Numbers.
How we created the maze game
The idea for the maze game came after I saw some of Tom’s side projects where he used random numbers to create art pieces. We first connected this programme to our QRNG, and he called this “Quantum Art”- it looked truly artistic. Then, the idea for the maze game was conceived when we started thinking about what we could build with the QRNG that people could play around with. First, we knew a game would be perfect for user interaction, and then we thought about what type of game would actively use Quantum Random Numbers in a way that would determine the game experience… the maze game felt like the perfect vehicle to do that in. We felt that it was an option that allowed users to feel the magic of Quantum Random Numbers.
Read Tom Gardiner’s blog to find out more about his work shadowing experience at Quantum Dice.
How the maze game harnesses quantum random numbers
The maze game harnesses quantum randomness via our QRNG which relies on the fundamental principles of quantum physics. At every junction, quantum randomness determines the direction you must take. Quantum randomness is employed in the creation of the maze walls and path. First, a path planner was created which uses a depth-first search algorithm with a recursive function to create the paths. It traverses through all the cells starting from one end of the maze box, and on each cell it randomly selects, it determines which direction to turn out of the four different sides of the cell (up, down, left, and right). When all the cells have been visited the path planner exits the box while ensuring that a correct path exists from the beginning to the end.
What differentiates our maze game from others is the use of quantum randomness in planning the paths and placing the walls of the maze. Although for smaller mazes or games this may not reflect much advantage, for bigger games where randomness is used extensively to create different unique experiences, it presents significant advantages by thwarting attacks like “Direct cryptanalytic attacks” or “State compromise extension attacks.” This stems from the inherent nature of quantum randomness. Its independence from states or seeds prevents the deduction of patterns from any segment of its random number stream, making the application more resistant to attacks. For example, it was reported that in 2010 the fail0verflow group of hackers revealed that they were able to extract Sony’s private key used to sign software for the PlayStation 3. This attack was possible because Sony used a “constant number for each signature”, rather than using truly random numbers (BBC News, 2011).
Randomness in Gaming
Games that embrace randomness:
Our maze game certainly isn’t the only game to utilise randomness. Let’s take a closer look at examples of other games that have embraced randomness to create memorable gaming experiences:
- Rogue-Likes: Games like “The Binding of Isaac” and “Spelunky” are known for their procedurally generated levels and unpredictable item drops. Each playthrough offers a fresh challenge, and the element of randomness keeps players on their toes.
- Card Games: Collectible card games (CCGs) like “Magic: The Gathering” and “Hearthstone” rely on randomised card packs. This randomness adds a layer of excitement to deck building and card collecting, as players chase after powerful and rare cards.
- Random Encounters: Role-playing games often feature random encounters with enemies while exploring the game world. Games like the classic “Pokémon” series use random encounters to keep players engaged as they search for creatures to catch and train.
- Loot-Based Games: Titles like “Diablo” and “Borderlands” are famous for their loot-driven gameplay. Randomised loot drops ensure players constantly search for the next item or upgrade.
Conclusion
The maze game is a simple but effective example of the inherent unpredictability of the random numbers Quantum Dice’s QRNG can generate. Working with Tom was enjoyable. His sharp intellect and quick grasp of coding concepts made this a fun and interesting project to work on. It’s inspiring to see his enthusiasm and aptitude for learning and coding. I’m excited to have been his QD buddy and to see what he was able to achieve during his short time with us.