Friday, May 27, 2011

Breaking Out Update

Just updating the blog with what we've been working on. John and I have thrown around a few ideas for various games, and we're probably looking at copying some game out there for our next learning experience. Something simple, probably along the lines of Pacman, Space Invaders, Tetris, etc.

However, we have been working on our 'Breaking Out' project that we began with the tutorial listed on the right side of the page. Where the tutorials left off, bricks did not have collision detection built into them. John and I have been working on figuring out how to make this work as it should. It's not the fact that we have trouble doing collision detection, so much as understanding how to implement it in our current situation.

The way the bricks are currently being drawn, the program procedurally draws the bricks, starting at pixel 0,0 and placing a new brick to the right of the brick before it. Once it reaches the 'screenBounds' rectangle, which defines the size of the window the game is played in, it makes a new row. It continues this until it has drawn the number of rows we have defined in the program.

It is not only generating a 'Texture2D' per brick, it is also generating a 'Rectangle' per brick. This is how the tutorial has it set up, and the problem we're having is pulling the rectangles location to be used in another classes collision detection.

We have changed many various things in the program to attempt to make this work, and we believe we are pretty close to finding the solution. An update will be made once one of us discovers the appropriate way to make this work.

No comments:

Post a Comment