Comp 151 Project 6
Practice with objects through using
Arcade
Summary:
In this 6th project you will write a small 'proto-game' program
Sun Dec 4th, 2022 at 11:59pm
Description:
Note: this will be the largest project of the semester (and worth
the most credit). There will be one more shorter project at the end of the
semester.
Once upon a time there was a series of arcade games designed to take your
quarters (back when quarters were valuable) that started with galaga
(you tube to watch if you've never seen something like this before.)
You are going to build a simple proto-game in this rough style.
Write a program using arcade (even if you have prior
experience with pygame,
you can't use it) that will do the following:
Note 2: I often get asked by excited or more experienced students
when I assign assignments like this about doing more than required. My
answer is, as long as you are using arcade and no other external
libraries, (except maybe gtts if you really want) And you do all
of the requirements below, then you can add whatever else you
want.
Note3: You may use any theme you
want so long as it is appropriate for class. The traditional
theme of space battles is fine, but I've also see someone use a theme of
hungry teen-agers being thrown hamburgers, and another with a singer using
a t-shirt cannon to give t-shirts to over-enthusiastic fans. You can use
the arcade assets as we looked at in class. Here
are also a zip file of assets with permissive enough licenses for
us to use them in class.
This project has a lot going on, and is large enough to see that
everyone's code should be quite different. I mostly have requirements for
how it should work, rather than exactly what code should be written.
You will need at least two code/python files for this project
- One file should have your main function in it.
- your main function should create the arcade window, set it up and
call arcade.run
- You may only have the call to main() at the top-level (left edge of
the screen) everything else needs to be in functions or classes.
- The other file should have your windows class which extends
arcade.Window, this is where nearly all of your work needs to be.
- add all of the functions to the class that you need to update, draw,
and handle user input.
- feel free to add extra class functions if you need to break something
large into a smaller chunk of code.
Functional Requirements:
- You need to have a player
- the player should start near the bottom of your window
- the player needs to respond to mouse or keyboard input to move side
to at the bottom of the window
- the player should have a way to 'shoot' using either the keyboard or
mouse;
- The player must be able to shoot more than one shot, but not more
than 5 on the screen at one time.
- play a sound when the player shoots
- if the player gets hit by the enemy/target, the player is defeated.
- play another sound if the player is defeated
- You need to have 'enemies' or targets.
- start with 6 targets on the screen at the top of the screen.
- These must come in from the top of the screen and move towards the
bottom of the screen (not too fast, not too slow)
- At first the 'enemies' should appear at a random place at the top of
the screen about twice a second.
- once they appear, the targets/enemies should move down the screen
toward the player
- if the player shot hits the target, the program should play
another sound
- if the player shot hits the target, update the score.
- The player shots should initially appear just above the player and
move upwards at about the same speed that the targets are moving down.
- if the shot and the target collide remove both, update the score
- display the score
- somewhere on the window, display the score and update
- Winning:
- if the player hits 20 targets then stop the game, play a win sound,
and announce to the player they won
- Losing:
- if the player is hit by one of the targets, play a lose sound, stop
the game, and announce to the player they lost.
Extra credit: This project will be worth about 300 points (so quite a
bit more than the early projects.) There is a lot to it, but if you
finish the requirements above, you can do extra credit. Extra credit may
require you to go beyond the stuff we've done in class. You might have
to learn a bit on your own on the web.
you do have to finish the main project before doing the extra credit.
If you do the extra credit, be sure to mention it in the comment at the
top of the program
- Lives (60 points extra credit possible)
- give the players three 'lives' to start with
- display the lives somehow
- if the player uses a life, update the display
- if the player gets hit by the enemy/target, now just remove a life
- if the player loses all three lives, then lose the game as above.
- Increasing difficulty. (for 60 points extra credit possible)
- after approximately 30 seconds, and roughly every 30 seconds after
that increase the speed of the targets
- and the speed/frequency that new targets enter from the top of the
screen.
- Two kinds of enemies (for 60 points of extra credit possible)
- have two kinds of enemies
- one kind of enemy/target should act as in the main requirements
above
- the second kind should
- have a second picture
- take two shots to remove
- increase the score by 5 times what the usual target increases the
score.
Other Requirements
yourNameProject6
(so mine might be JSantoreProject6)
And put the following at the begining of the
python file with the main function as a comment:
Project Submission
Submit the project by putting it on github as a private
project and making me a collaborator as before.