Project 3 Fun and games with python
Due by Oct 31st at 11:59pmAs disccused
in class when the lab was handed out, I will extend the deadline for this lab till
11:59 pm Sun Nov 4
Introduction:
In this lab you will try out python's GUI/graphical/multimedia
capabilities. You will create one of two simple games that will run in
windowed mode.
Details:
You must first make a folder called project3 and do all of your work
for this lab in that folder. Use the command
mkdir project3
to create the folder (you'll only need to do this once) and
cd project3
to move into that folder (you'll need to do this everytime you log in
for a new session.
You need to have a game that pops up a window and provides at least the
following buttons,
- quit,
- go left,
- go right
- go up
- go down
The quit button obviously exits the game. The other four should control
the players avetar moving it in the indicated direction.
You have a choice in the game that you implement (if you get to be
quickly).
Choice 1
You may write a simplified berzerk like game.
In this Berzerk-like game you control your character who is trying to
kill lots of robots and escape from them. You can shoot a laser beam at
the robots in the direction you are facing once per helf second. If the
laser beam hits the robot, it dies. The robots are trying to kill you.
If they touch your character, it dies. If your character runs into one
of the "electrified walls" it dies. The robots will also occasionally
(once per 2 seconds or so,) shoot a laser in random
direction, if
it hits the character it dies. The object is to kill the robots and
escape to the next level.
- This simple version will have three levels
- The first level will have 3 robot enemies, the second
four and the third level will have 5 robot enemies
- Once your character moves from one level to another, you
cannot return to an earlier level.
- A final score should be shown once the last robot in level
3 is killed.
- the person should be 5 points per robot killed and 10
points per level entered.
Choice 2
Or you may write a simplified graphical nethack/roguelike game:
In this game you will get a character who is trying to collect
money/coins. (this is the score.) There are impassable walls, and
unpleasent "monsters" who will try to kill you by touching you. You
lose 1 health per touch. You also have some sort of a weapon that will
"kill" the monsters in the direction you are facing. The character must
press the weapon key to use this weapon. If your character
goes
to 0 health, it dies and the game ends. If you run over a coin, the
coid dissappears and your coins score increases. There will also be a
"powerup" that increases your current health when you run over it.
There should be three levels for this game as well. At the end of the
third level there should be an "exit" that when the character steps on
it will end the game and report their score.
Freedom of genre
The example games discussed above show a sci-fi and a fantasy theme.
You can use your own theme so long as the basic rules of the game as
discussed above are implemented. Also as this is a class, I expect that
the themes will all be PG rated: no inappropriate themes.
So you could have a game that follows the second convention where we
follow the adventures of "amazing amanda" who is fighting the evil tax
collector agents and trying to collect her w-4 forms that have blown in
the wind. She needs to wack the IRS agents with her binder of power if
they get too close. Or whatever.
Artwork
Feel free to use any artwork that is out there which is either public
domain or available for use in non-profit endevors. I leave it to you
to avoid copywrite infringement.
On the use of existing code
This is an upper level class and we are using large libraries. There is
value in reuse of code. However, this is also a time for you to write a
program in python on your own. So here are this projects guidelines for
code reuse. You may use existing code from demo and other projects
provided
- you cite in your documentation what parts of your project
were written by someone else
- you have no more than 50% of your project is from someone
else.
- If you have used extensive borrowed code, I expect a more
polished program than I expect from those who wrote their projects from
scratch.
Documentation
When you are done with the project, you need to add a file called
readme.txt which contains documentation about your project. You need to
cover at least the following in your documentation
- your name
- Which of the two program templates you are following
(Bezerk or nethack)
- Directions for how to run your program
- A brief description of your theme and what I should expect
each
of the things to look like (how do I know what is a player and what is
a "monster"?, include any directions for playing that one would need
beyond what is available in the lab directions.
- A list of anything that was left undone
Submitting
When you are all done and your documentation is in the project3 folder
as well as the code and other resources, you need to zip up the entire
folder. If you are unfamiliar with zipping follow the directions below.
I assume your project3 folder is an immediate subfolder of your home
folder.
cd
zip -r yourLastNameProject3.zip project3
so I would type
zip -r SantoreProject3.zip project3
then submit the zip file via online submission.