Tuesday, March 24, 2009

Sprite Resource


Here's some sprites (not just the one's pictured here) I've collected from the 'net for rapid prototyping. Give credit where it's due, if you use them commercially, or just use them without needing to acknowledge the author, for placeholders. It really helps getting the animation and collision code working as an example. It means Art can continue working on the final assets while the Coders have something to use without holding up production.

Click here to download -> Sprite Resource (6MB ZIP)

Week 8 : Debugging and Classes


In this example I have provided the framework for a space shooter.

There are two classes, Alien and Star. There is a bug in Alien that makes all the aliens move to the top left hand corner. They should bounce around the screen.

1. Use the debugger and check the program execution to determine the error.
2. Continue working on the classes to derive new aliens and planets.
3. Add a player class.
4. Add player movement and shooting.
5. Add score.
6. Think about level design - we will cover this next week.

Here's the project - SpaceShooter

Wednesday, March 18, 2009

Added a new Gem type to Platformer kit

As part of the lecture/workshop to add a new Gem class we ran into a few issues which I have solved in this pdf.

Platformer_Changes_AddARed150PointGem.pdf (open this to see code changes on left as compared via WinMerge on the original code base - the level 0.txt file shows the changes in a red box)

1. In Gem.cs - make some attributes public, created sub-class Gem2 and defined a new contructor to override color and points attributes. Also changed points to not be const. Made Level a public type so Gem2 could access it, rather than create a new instance(the bug we ended on).

2. In level.cs - allowed for two letters G and Q to make gems, and added score value.

3. Added the letter Q to designate types of Gem2 in map.

Tuesday, March 17, 2009

AlienShip Class Inheritance

Here's a solution for C# that demonstrates how to override a method with a new sub-class of alien ship and then iterate over the base class to access them all regardless of their place in the heirarchy.

We will discuss and implement this in the lecture today.

Why do you want this? So you can make a 1000 different types of aliens and then in 1 foreach loop access them all for drawing, updating etc, without messy switch statements.

This also addresses part of our studies to deal with arrays of user defined types. We will also look at debugging today.

AlienShip Class

Monday, March 9, 2009

How to guide for XNA

This is a revisit of the Object Oriented Programming concepts we have been looking at.
Classes For Games

Found this guide... good for us - shows what is required to hook up the Xbox and programming it.
Getting Started with the XNA Creators Club

Tuesday, March 3, 2009

Week 5 - Online Lecture

Please review the lecture notes and XNA tutorials for this weeks lecture.

Step 1.
Class Description document - PDF
Class Concepts lecture #1 - Inheritance (H.264 encoding - use VLC from week 4)
Class Concepts lecture #2 - Polymorphism, Encapsulation and Abstraction (H.264 encoding- use VLC from week 4)

Step 2.
XNA Signing up (H.264)
XNA Getting started (H.264)
XNA Starter Kits - Download It (Marblets) - (H.264)
XNA Starter Kit - Running one (Marblets) - (H.264)
XNA Tutorial for week 5 - (H.264)

Step 3.
Finally please revisit week 4's power point after you have done step 1 above.
Week 4 Power Point on Object Oriented Programming Concepts.