Objective: To refine parts of the level to publish a working game to the Google Play Store
In the previous series of articles, I got the basic version of Dungeon Escape working on Android devices, including Unity Ads. In this article, I will go over some areas of improvement to fill out the game.
I need to add several dead zones to make sure the player does not get stuck, or fall off the level. In the pits I have painted some spikes, and I have added an empty game object with a Box Collider 2D and Rigidbody 2D and script to have the player die if they fall on the spikes. I will make the dead zone game object a prefab and place in other parts of the level.
Update Attack and Power ups
There are two other power ups in the shop, a flame sword and boots of flight that we need to use. In this game, I will use a basic sword to first kill the spider, then the player has to purchase the flame sword to defeat the skeleton and moss giants. In addition, the end of the level is set too far away for the player to make a regular jump, so the player has to purchase the boots of flight to make the jump.
In the Game Manager, I will start with two additional bool variables to track if the player purchased the flame sword and boots of flight.
We can leave the spider attack alone as that can be damaged by any weapon. I will update the skeleton and moss giant C# scripts to only take damage if the player purchased the flame sword.
We can update the player C# script with the power ups, to set the sword arc active and a greater jump height.
Now we can update the shop with the two other purchase options. We need to update the bool variables in the Game Manager, and call the functions in the player script.
Let’s see if this works.
Thank you for your time!
I have a few more updates to make to the game in the next article.