27 December 2014

Developing Square Drop - Part 6

I've added a lot of important features to my game today, including the ability to replay, having a score screen and adding a lose condition when the square touches the side of the screen (which happens when the player doesn't tap at all). Square Drop is ready for playtesting!

Things I've done today:
  • Added lose condition and the ability to replay
  • Added HUD class inside which the 'Replay?' text when the player lost, and the score screens are shown
  • Learnt how to use GUISkin layouts
  • Learnt how to add an audio source. Tap sound activates each time the square drops successfully
  • When the square touches the side of the screen, the game is over
  • Changed screen oriantation so its always portrait
  • Added a restart function which resets everything when the player taps the screen after the lose condition is activated
This is the game:
At the beginning to prepare the player as well as load the platforms properly, it takes the square about 2-3 seconds to drop on the first platform:

Once it lands, it moves right towards the first gap:

If the player successfully taps the screen once the square's above the gap, they receive a point:
The square then moves in the opposite direction towards another gap. The process repeats until the player loses the game.

Once the player touches the screen too early, or too late resulting in the square not fitting in the gap, everything stops, the player gets to see their score, and is given a chance to restart:

These are my classes along with the code:





No comments:

Post a Comment