3 May 2015

Polishing Square Wobble

This weekend I carried on working on my prototypes, this time - Square Wobble. These are the things that I have polished:
  • Just like in Square Drop, I removed the sensors and gap in the obstacle prefab, and instead simply created an empty gap between the left, and the right obstacle arms.
  • Because I used to give a point during the gap onTriggerExit and now the gap object is no more existent, I put an object in front of each obstacle, so that when the square touches it, it gives a point instead
  • Because of removed redundant objects, the code is now a lot shorter and cleaner than before, making the game should work smoothly.
  • Added the highscore
  • Added the restart button
  • Added new skins making the score always appear in the middle, and highscore in the top right corner with smaller font
  • Renamed some variables and objects so that they refer to clicking and not swiping as it used to be before the iteration
  • Renamed ObstacleSpawnClass to ObstacleGeneratorClass and ClickClass to InputClass so they make more sense (will do the same in Square Drop)
  • Learned how to have multiple sounds in one object by using variables to trigger them. Now the square has both - the point received sound, and the game over sound
  • Updated obstacle spawning. Used the same way of coding as the one in Square Drop.
  • Moved the spawn point from the position where I want the obstacles to start spawning as opposed to saying it through the code so that I don't need to remember know the y coordinates of the spawn point (will do the same in Square Drop)
As usual I'm posting the updated code:

SquareClass:

ObstacleClass:

ObstacleGeneratorClass:

InputClass:

GUIClass:

No comments:

Post a Comment