GameDev.TV Unity Challenge Club, Quest 7
I am continuing through GameDev.TV’s Unity Challenge Club Quests, this quest is deemed the “Mining” quest. This game uses Unity's 2D Roguelike asset pack and is a roguelike dungeon crawler. The goal of this quest was to expand on some basic skeleton code and expand on this.
While most of the tasks were to set up basic functionality, the last mission aimed to create a new feature for the game. My initial goal was to create a “damage block” for the user to try and avoid. This rock prefab has a sprite with a skull in it, and when the user tries to break this block, it will cause the player to lose a life. However, since the project did not have a life feature implemented, this was the next step. After implementing the lives for the game, the next challenge was making each level seem different and challenging. I decided to use this random generation to help add some difficulty the further the player progressed. A counter adds the current level number to a variable when a level is complete. This value is added to the maximum ranges for the random numbers. The result is a difficulty that gradually increases as the player progresses, but in a way that the player will not recognize that it is occurring. Finally, while the challenge to the player was working, there was no system in place for retention. Initially, there was no sense of achievement when the player died; the game rested, and the manager erased player data. Initially, I wanted to add a leaderboard and determine what value to store. The food would not be consistent because the number of food pickups is randomly generated. The result was a formula: the number of food picked up, rocks destroyed, and levels reached, with the latter weighted more. Finally, to prevent the player from just going through the level and trying to get to the exit, a requirement was created to obtain all food pickups before the door was active in the scene. The mini-game is available on my itch.io page (ndaygamedev.itch.io/cycle-mining) and below.