Summary

In this Unit of Create with Code, I had to program a game to test the player’s reflexes, where the goal is to click and destroy objects randomly tossed in the air before they can fall off the screen. 

How to Play

  • Left click on the crates to destroy them
  • Don't click on the bombs!

Project Outcomes

In creating this prototype, I learnt how to implement a User Interface into my projects. I added a title screen with a difficulty select menu that will control how challenging the gameplay is,  a score display that will track how many points the player has earned, and a Game Over screen, which will allow the player to restart and try again. In learning these skills, I am now able to create a fully “playable” experience that the user can enjoy from start to finish without having to restart the application to try it again.

After completing this Unit, I am now able to:

  • Create a Game Manager object that controls game states
  • Detect where the user has clicked their mouse in order to create a click-based program
  • Use the Canvas to create UI elements like a Title, Buttons, or score display
  • Lock elements and objects into place on the UI with Anchors
  • Use variables and script communication to update elements in the UI
  • Make UI elements appear and disappear with .SetActive
  • Use script communication and Game states to implement working “Game Over” screen
  • Restart the game using a UI button and SceneManagement class
  • Add listeners to detect when a UI Button has been clicked and trigger functionality
  • Set difficulty of gameplay from title screen by passing parameters between scripts