User Interface / Polish


User Interface / Polish Implementation

The first task completed this week was finalising and polishing the menu. The different menus were created by making game objects for each menu, ie. the main menu, level select menu, and high scores menu. The titles and buttons for these menus were attached as children. By default the main menu is set as active and the others are set to be inactive. The transitions between menus are achieved by disabling the current menu game object and enabling the selected menu game object. In doing so, a separate scene does not need to be loaded to change menus, meaning that switching between menus is responsive and the music stays consistent between these switches.  



Menu game objects, with the main menu set as active by default. 


The result of this is a responsive main menu, as seen below. An improvement that needs to be made with the menu is to add a settings option, so that the player can change the sound volume, difficulty, etc. The difficulty setting could alter how many save points are in a level, and affect the score penalty for dying / resetting.  


Menu screen for Cave Divin'.


The other task completed this week was implementing a score system to the game. Treasure is scattered throughout the levels, and has different sprites for the purpose of adding variety. All treasure provides the player with 100 score. Dying or resetting causes the player to lose 2000 score. This system is effective because it incentivises skilful play and creates tension for getting a high score. 

To improve the visuals of the treasure and make the game feel more alive, a script was added that causes each treasure game object to constantly rotate on the y-axis and move slightly up and down. This was achieved with the transform.Rotate() method for rotating the treasure and using the Mathf.Sin() function to alter the y component of the treasure game object's position in the Update() function. A sound effect plays when each treasure is collected, which is important for providing positive feedback to the player and makes collecting the treasure more addictive. The scoring system can be improved by adding a timer for each level, where completing a level in a short time provides the player with extra score. This would create an interesting gameplay balance between collecting treasure and speed-running, encouraging the play to replay each level until they find the optimal path. 


Collectible treasures to increase player's score.


To ensure that the score is consistent when reloading the scene (ie. after each death), PlayerPrefs() is used to set the value of the score. At the end of the level the player's score is compared to the high score value for that level (also stored as PlayerPrefs()). If it is higher, the high score value is overwritten. The high score values are used to display the scores in the high score menu. Whenever a level is completed, or when a level is selected from the menu, the players score is set to 0. This ensures that the scoring is always consistent between levels. At the end of each level, the player's score for that level is displayed as a message.  


End level screen.


Testing / Feedback

For the current build I received the following feedback:

1.  There are some overlapping textures in the levels.

This is super easy to fix, and only requires going through each level in Unity and editing the tile map to ensure that the correct tiles are painted.  

Files

Week 11 Build.zip 23 MB
May 15, 2021

Get Cave Divin'

Leave a comment

Log in with itch.io to leave a comment.