Developing Game-Themed Applications with XNA

Day 1 - Section III: The Block Breaker Game
e. The BlockSet class

back to Day-1 main page


References:

Goals: In this tutorial we want to experience:



Implementation:
  1. Create a new file: BlockSet.cs. This is container class for the blocks hang-off the middle of the application window. Here is the link to the file. Interesting features of this class includes:
  2. Changes to: Game1.cs


Lesson Learned:

The only slightly interesting point to note is, w can re-create the block set in the middle of the ball-flight. This kinds of make the game interesting (or un-interesting). Try it, send the ball flying, when the ball reach the top of the application window, press-B. Now the ball is trapped at the top-half of the application window. Cool? Maybe not?


This document and the related materials are developed with support from Microsoft Research Computer Gaming Initiative under the Computer Gaming Curriculum in Computer Science RFP, Award Number 15871, and 16531.


Kelvin Sung
Computing and Software Systems
University of Washington, Bothell
ksung@u.washington.edu