WEEK: 11

Homework

For this homework, you are going to create a game. It should be made up of a bunch of simple shapes (they can be the same or different). After you place them on the screen, you should move them around the screen randomly. If they leave the screen, you should have them go to the other side of the screen. You should also have a way to place an obstacle onto the screen with your mouse. Once the player moves off the screen through the exit, you should display a message that says “You Win!”. Don’t worry about any collisions.

Homework Walkthrough Video

Homework Example

Specifications

  1. Create a canvas
  2. Create a player.
  3. Move the player using the keyboard.
  4. Place multiple obstacles (at least 2) of different sizes and colors on the canvas.
  5. Move the obstacles randomly around the canvas. If an obstacle leaves the screen, have it come back on the opposite side.
  6. If the user clicks the mouse, add a non-moving obstacle to the screen (only need one).
  7. Create a visual exit on the canvas
  8. If the player goes through the exit, a message should appear indicating that they won
  9. Use if/else, if/else if statements.
  10. Use logical operators. (at least one of them)
  11. Ignore all collisions.
  12. Take the Kahoot Quiz
  13. Upload everything to your repository and turn in your link.

Previous section:
Next section: