Developing Programming Assignments on the XBOX 360 Console

Section III: The Block Breaker Game
e. Including file texture images

back to workshop main page


References:

Goals: In this tutorial we want to experience:

Library function to notice:

Implementation:
  1. Including texture resources: Under the Solution Explorer, open the Content tab,
  2. Background Texture: Game1.cs:
  3. Block Texture:  Block.cs
  4. Paddle without texture: Paddle.cs: Recall that the Paddle class is a subclass from the Block class. By include a texture for the blocks, paddle will also display the same texture. This is kind of ugly, so let's change the texture for the padde:


Lesson Learned:

There are two things we should keep in mind when working with file textures:

  1. Inclusion into the project: we must add each texture image into the project. These images must be added to the Textures folder under Content/Resources.
  2. Using the texture image: Notice we use the texture image without the file name extension.

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.


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