While working on my upcoming Loot Box system, I needed to shuffle a list, and discovered the Fisher-Yates shuffle. It was easy, and clever and I wanted to share it with the world!
Fisher-Yates Shuffle: https://en.wikipedia.org/wiki/Fisher–...
Stack overflow: https://stackoverflow.com/questions/2...
Game Modules: https://assetstore.unity.com/packages...
All Infinity PBR Assets: https://assetstore.unity.com/publishe...
Join our Discord: / discord
In today's video, we dive into the world of game development, specifically focusing on a loot box system I'm currently working on for my game, Legend of the Stones. This system, which will also be released on the Asset Store in the Game Modules package, involves items that might spawn with random attributes like prefixes and suffixes.
I demonstrate how the order of these attributes can be randomized. You'll get a look at how different permutations of these attributes appear with different items.
We then explore the Fisher-Yates shuffle, an efficient shuffling technique, referenced from a helpful Stack Overflow post (link in the description). I walk you through the process of this shuffle, explaining how it provides an equal opportunity for all permutations.
The video concludes with an overview of the implementation of this shuffling technique in my code. If you're interested in more game development tips and tricks, and updates on Legend of the Stones or Infinity PBR's characters and environment packs, remember to like, subscribe, and comment!
#GameDevelopment #LootBox #RandomAttributes #FisherYatesShuffle #LegendOfTheStones #GameModules #AssetStore #Unity #CodingTutorial #InfinityPBR