Year-end Assessment Activity

For the year-end assessment activity, you will be required to collect all of your .py files from throughout the past school year, and upload each of them to a new repository in your GitHub. Keep your final pygame game as a separate repository.

Step 1: Create a repository for all of you .py files that you created throughout this school year. After creating, upload all your .py files to your newly created repository

Step 2: Create a new MS Word Doc or Google Docs document. Copy and paste a link to your 2 GitHub repos, the one with your game, and the one with all of your .py files for the year, into your document.

Step 3: Copy and paste the following self-assessment questions and answer them in the same document:

  1. What Unit of study did you find the most interesting? and Why?
  2. Is there a particular Unit that you would like to explore more in depth after this course is completed?
  3. What Unit of study did you find most difficult. Describe an example of a program or problem that was hard. How did you overcome it, and how did you eventually solve it?
  4. How do you feel about your ability to create something using python having completed this course? Is there something you might want to create having completed this course (another game, another program), please explain.
  5. Please rate your work habit this past school year in this class, excellent, good, satisfactory, incomplete. Please explain why.

Step 4: Save your document, and hand it into the server as usual

This assignment will be worth 20% of your term 3 mark.

Final assignment, Pygame

Well we have finally made it to the final assignment. I am really looking forward to what you will create.

Main Requirements:

  • must have an intro screen, that then goes to an instruction screen, that then goes to the main game (see the instructions program we created a few classes ago).
  • Intro screen requirements:
    • Must have a title (in text or graphic) for your game
    • Must have graphics, bitmap or computer drawn
    • Must include a way to move to next screen, and instructions to do so, eg. (hit enter to continue, click here to play)
    • Must display the current high score and the user
    • Must play a short background music when loading (5-10 secs)
  • Instructions screen requirements:
    • Must take in a username
    • Must explain the controls of the game, and how to gain points
    • Must include a way to move to the game screen, and instructions to do so, eg. (hit enter to continue, click here to play)
  • Game requirements:
    • must have a bitmap image sprite
    • must have a computer drawn sprite
    • must have sound effects in the main game
    • must have more than 1 level
    • when the game ends, display a game over message somewhere on the screen, then pause 2 secs before ending.

Ideas for games could be:

  • tic tac toe
  • typing game
  • space invaders
  • maze runner
  • frogger
  • pacman
  • road trip car game

If you are struggling to come up with a game, then modify the bullets code to make a space invaders type of game. You must have the following:

  • change the player to a bitmap sprite spaceship, make sure your image is small enough
  • create different kinds of enemies, some bitmap sprites, some ellipses, change sizes and colors of blocks
  • have the enemies move down the screen, then respawn at the top when they reach the bottom.
  • track if the enemy collides with the spaceship, then the game ends
  • create a new level where the enemies move quicker, and make more of them

Program comments:

I won’t require you to include psuedocode for this assignment, but you will need to include detailed comments in your program. A general guideline is that you provide 1 comment for every 3 lines of code in your program. Your comments should explain what the lines below are doing so that if someone else wanted to modify/add to to your program, they could understand what you are doing.

Due Date:

Your final assignment is due Wed Jun 14. Which is 10 classes to work on this assignment.

Looking at a couple of Pygame examples

OK, so last class, we looked at the bullets example, think of how you could possibly modify this game to your classic space invaders game:

http://programarcadegames.com/python_examples/f.php?file=bullets.py

In this example, there is a player who is enclosed by walls. Again, imagine how you could modify this to a maze game, or even a pacman game:

http://programarcadegames.com/python_examples/f.php?file=move_with_walls_example.py

Finally, this is your centipede/snake type game. Think about how you could create a game where there would be more than 1 snake, and you can maybe shoot bullets to fire at another snake:

http://programarcadegames.com/python_examples/f.php?file=snake.py

For Wednesday’s class, think about a possible final game that you would like to create as the end of the unit assignment. Try to be creative. One Wednesday, I will give you requirements of your assignment. If you are stuck for a final assignment, I will give you some parameters for a simple game that you can modify.

Adding Text and getting User input in Pygame

Today we will look at adding text to the pygame screen, and examples of instruction screens. Then we will look at taking user input in pygame. Finally, we will look at a centipede example game, similar to a slither.io game that you could extend.

Adding Text, copy and paste the following into your wingIDE:

https://pastebin.com/embed_iframe/mA3SwECj

Adding Instructions, and getting user input, copy and paste the following into your wingIDE:

https://pastebin.com/embed_iframe/w5BaLK5B