Time for action – creating the Robot Rampage project
In Visual Studio Express, create a new XNA 4.0 Windows Game project called Robot Rampage.
Download the
2403_06_GRAPHICSPACK.zip
file from the book's website, and extract the graphics resources to a temporary folder.In the Robot Rampage
Content
project, create a new folder calledFonts
.Add a new
SpriteFont
calledPericles14
to theFonts
folder, updating the generated XML file to change the<FontName>
toPericles
.Also in the
Content
project, create a new folder calledTextures
.Add the graphics resources from the temporary directory to the
Textures
folder.Copy the
SpriteSheet.png
andTitleScreen.png
files from the temporary folder you extracted them to in step 2 into theTextures
folder, and add them to the project.In the declarations area of the
Game1
class, add a declaration for the sprite sheet and font objects:Private spriteSheet As Texture2D Private titleScreen As Texture2D Private pericles14 As SpriteFont
In the Initialize() method...