XNA Creators Club Online

beginner's guide

2D Lessons

1 Introducing the 2D Tutorial
2 Creating the Game Project
3 Adding Assets
4 Drawing the Background
5 Creating a Cannon
6 Firing Cannonballs
7 Adding Enemies
8 Destroying Enemies
9 Keeping Score
x Extra Credit - Community Tutorials

4. Drawing the Background

Draw your first 2D graphic - the backdrop for your game. Learn about loading assets through the Content Pipeline, sprite drawing and dimensions.

Step 1

Watch Video
Survey the code provided to you by XNA Game Studio and instantiate your first classes.

Step 2

Watch Video
Load a 2D texture into your game using the ContentManager class - learn about content loading at runtime.
More Details

Step 3

Watch Video
Calculate the size of the game screen and draw your 2D texture to stretch to the size of the screen using SpriteBatch.Draw.
More Details
Download source code
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG