CSS 290- Assignment 4 ( a.k.a. A4)
DUE DATE: Thursday, May 1
You are required to work with 1 other person on this assignment. If you absolutely have to, you can work with two other people. Each group (of either 2 or 3 people) will work independently of the other groups; you're allowed to work with your group, but you're not allowed to work with anyone outside your group. If you have questions, please contact the instructor.
|
Learning Objectives:
(This is a list of the major topics that you, as
students, will learn in this
assignment:)
A pre-compiled, example solution is provided to you, as part of the .ZIP that contains the starter project for this assignment. Within the folder named Precompiled_Example_Solution, if you double-click on the file named BirdVsKid.exe, you should
In order to demonstrate mastery of the material that we've covered in class, your game must have:
The bird must move from side to side across the top of the screen.
In the example solution,
you'll notice that the bird actually turns around (this is done using
two different sprites). You are NOT required to have the bird (or
kid) turn around. You're welcome to add it as an extra, if you
want
The bird must randomly drop the egg
Only 1 egg is dropping at a time
When the egg goes off the bottom of the screen, then it will disappear, and the game will randomly drop the egg again in the future
The egg should start from where the bird currently is.
In the pre-compiled example, the falling egg has a side-to-side speed, as well. You are NOT required to give your falling egg a horizontal speed, although you are welcome to do so, if you want.
The player controls the kid at the bottom of the screen.
This is done using the XnaAssignmentBase.GamePad.ThumbSticks.Left.X and XnaAssignmentBase.GamePad.ThumbSticks.Left.Y, as we saw in-class.
The kid should not be allowed to leave the screen.
When the player presses the 'A' button, an umbrella should appear (where the kid currently is), and move towards the top of the screen.
There is code (in the region that's labeled "Shoots an umbrella with A-button (if one is not already shot)") that checks if the 'A' button is currently being pushed. You should be able to use that to figure out how to make the umbrella appear, if the player has pushed the 'A' button.
You must keep track of two 'scores': the first is the number of times that the egg has hit the kid. The second is the number of times that the umbrella has hit the bird. You must display both of these 'scores' at the top of the screen, as you see in the example solution.
When the umbrella hits the bird, you are required to move the bird back to the center of the screen. Likewise, when the egg hits the kid, you are required to move the kid back to the middle of the screen.
You should calculate the middle of the screen using the WorldMax.X data field (instead of just typing in something like "360")
Within the Controller code, there are a number of #regions already defined for you. You are required to put the appropriate code into the appropriate region. For example, you should put all the code that relates to moving the bird around into the region labeled "update the bird". This requirement is here mainly so that your code has some structure, and therefore should be easier to both write, and to understand.
It's not required, but you are encouraged, to get 1 thing to work, and then go on to the next. So start by making the bird move from side to side (say), and only once that's working should you then go on to figuring out how to drop the egg.
There are a number of sound ques that can be played within the game. They look like "PlayACue(0.4f, "ShootUmb");". Most of them are commented out. You are NOT required to use sounds. If you want to use them, feel free to do so.
If you want to, you are welcome to change the images to be something else. Also, as long as the above game elements are done, you're welcome to change (or add) to the game.
You are required to work in groups for this assignment. If you have questions, please contact the instructor.
What to turn in:
Each group will hand in 1 copy of their work. We will go over this at the start of class, on the day this assignment is due.
How to electronically submit your homework:
Instructions to do this will be given in-class on the date that this assignment is due.