This worksheet combines all you've learned in the previous worksheets to build a small, working game. Although you've done all the various parts separately, bringing everything into one working application is far from easy: you get an explosion of complexity and you need a clear head to work your way through it.
To get the most out of this worksheet you should do the following:
If you are unable to finish any of these worksheets in one go, then this is what you should do to make sure that you can resume it from the point you finished, without having to start from scratch:
Unlike the previous worksheets where you've been led my the hand, in this case I want you to think...
Using what you've learned so far about XNA, create a game which works like this:
1. A fully inflated balloon rests near the bottom left hand corner of the screen, whilst a dart rests near the bottom left corner.
2. At some random time, the balloon is released at a random angle and flies upwards and across the screen, deflating as it does so. When it's fully deflated the balloon drops to the bottom of the screen.
3. The user may fire the dart at the balloon. If the dart hits the balloon before it's fully deflated then the balloon pops and the score is increased by 10.
4. The sequence repeats at regular intervals.
You should use your experience to tailor the parameters of the game to make it as playable as possible...
You should use the graphical assets provided for worksheet one: Worksheet Assets
When you've finished all the steps above, you need to close down Game Studio Express as follows:
Even with a simple game like this, you can easily get in a mess. You can find yourself forgetting which variables correspond to which screen object, or if you're really unfortunate you can find yourself in an awkward situation where trying to fix one error introduces another, and fixing that introduces yet another, and so on...
The real difficulty is that the simple techniques we've used so far don't scale up into bigger programs. We're missing some tools from out coding toolkit. There are:
These topics will be covered in your remaining lectures this term, and you will soon learn to apply them to your semester one coursework assignment!