This is an individual assignment to get everyone using Visual Studio, C# and XNA.
Objective: Set-up XNA to work with Visual Studio 2012 Ultimate. Understand the basic game loop and get a basic understanding of XNA.
Go through the tasks to install XNA on your own machine (several hours and GB's):
- Make sure you have Visual Studio 2010 installed (Express is fine, but any version should work).
- Make sure you have XNA Game Studio 4.0 (Refresh) installed.
- Make sure you have Visual Studio 2012 installed (Ultimate version will be used later in the course).
- Follow the instructions here to get VS 2012 to recognize XNA.
Note: For those using the Caldwell Labs (112D), if XNA is not available for VS 2012 yet, just use VS 2010. CL 112D is the room on the SE side of 112. These large machines are for graphics oriented classes. Feel free to kick any other students off of those machines who are not taking a course that requires those machines.
Go through the following XNA tutorials
- http://rbwhitaker.wikidot.com/introduction-to-2d-graphics (5 minutes)
- http://rbwhitaker.wikidot.com/managing-content (5 minutes)
- http://rbwhitaker.wikidot.com/the-content-pipeline (5 minutes)
- http://rbwhitaker.wikidot.com/spritebatch-basics (10 minutes)
- http://rbwhitaker.wikidot.com/drawing-text-with-spritefonts (10 minutes)
- http://rbwhitaker.wikidot.com/texture-atlases-1(note this has 3 parts - 20 minutes)
Using those as a starting place, do the following (as discussed in class):
- Using the Command Design Pattern, create a ICommand interface.
- Create an interface for any and all controllers
- Implement a Keyboard controller class
- Implement a GamePad controller class
- Include a Dictionary in the Keyboard (and GamePad) controller class that maps keys to ICommand instances.
- Create an interface for an AnimatedSprite
- In the Game class, only use the interfaces in the Update and Draw methods.
- Have a key (and gamepad button) that quits.
- Have a key that animates a sprite.
- (TBD) Have a key that changes to a death animation, gradually moves the sprite down and then signals the game to restart or quit (your choice).
Resources:
- Here are some sprites for you to use:
- Mario Idle (6 frames 17x18).
- Annotated Sprites
- Mario Mayhem
Work to turn in:
Grading Criteria:
Due: Wednesday, January 16 in class.