IOCT Masters in Creative Technogies
Major Project
An augmented reality game based on "Breakout"

Monday 30 June 2008

Brick properties

Each brick needs properties for positioning, collision detection, design information and keeping a record of how many times each brick has been hit.

Each brick has the following properties:
  • Position in x
  • Position in y
  • Width
  • Height
  • Half width
  • Half height
  • Number of times brick has been hit
  • Main colour
  • Darker colour
  • Lighter colour

To draw each brick, set it’s position and three colours (to create the pseudo 3D effect), then draw it to the screen if the number of times it has been hit is lower than the level number.

pos x = position in x
pos y = position in y