Home > Products > SophiaFramework UNIVERSE > Tutorial > Breakout > - 2 / 9 -

BREW Breakout - 2 / 9 -

Overview

This is a traditional Breakout game that uses directional keys or specific number keys to move the racket to shoot back the ball and destroy the blocks.

To make it more interesting, the following features have been added.

  1. Normal blocks which will disappear when hit once.
  2. Hard blocks which will disappear when hit several times.
  3. Invisible blocks that can be hit, but not seen.

These 3 types of blocks will be used and each level is cleared when the wall of blocks is completely destroyed.

In this game, application status is saved in the _status member variable of the Block class. The following image shows the correspondence between each state and the value of _status.

 

Key Actions From APP_STATUS_READY
* Boots up stage menu
Any Other Key Game Starts
Key Actions From APP_STATUS_PLAYING
Racket moves to the left
4
select Racket stops
5
Racket moves to the right
6
# Pauses the Game
Key Actions From APP_STATUS_PAUSE
Any Key Resumes Game
Key Actions From APP_STATUS_OPTIONS
1 - 4 Picks Stage
Key Actions From APP_STATUS_CONTINUE
1 Continue Game & Try Again
2 Quits Game
Key Actions From APP_STATUS_WAIT_RESTART
Any Key Starts New Game

Go back  1   2   3   4   5   6   7   8   Apdx   Next page