Welcome to Computer Programming

GameLab Assignments - GameLAB

Section 1

G-1 Space Invaders

Create a game with a sprite for the background (I used space) and a spaceship (vehicle). Have the ship move up (give it a velocityY of ___ ). If it gets to the top of the screen, have it appear at the bottom again. If they hit the space bar down, have it rotate around and go in the opposite direction (again if it gets off the screen, have it appear at the top) Photo link

Exceeds:

  • Use the left and right key to make ship also move left and right
  • Have left and right rotate ship 90 degrees (3.25)
  • Also if it rotates, it will then move up/down/left/right depending on direction (3.5)
  • Try to get rotate to work, this is tough - looks like you will use the command sprite.setSpeedAndDirection (4)

 

G-2 Ball Bounce

I want a ball to bounce around the screen. If it hits the paddle, have the ball bounce. Notes

Exceeds:

  • Make paddle move left and right
  • If the ball goes below the paddle, the ball resets to the top.
  • Have the ball speed up when it hits walls [try bounciness], but slow down when it hits the paddle)

 


 

G-3 Pong

Create pong the classic tennis like game where a ball will bounce off the top and bottom walls. The paddles move up and down trying to hit the ball. If they hit ball, it bounces, if the ball goes past, the other player gets a point. In our version of pong, the left player is controlled by w/s and right by up/down keys. Do not allow paddle to go off screen.

Exceeds:

  • Have the ball bounce differently depending on where it hits paddle
  • Have the game end at 5 points with an end screen.
  • Have an AI version

 


 

G-4 Frogger

Make frogger the most basic will have a character at the bottom of the screen. There will be at least 6 moving obstacles as shown with differing speeds. Some cars will move to the left, others to the right. When they get off the screen they will appear on the other side. The character will need to get past all of them and reach the other side. When she does, the score goes up by one, the cars move a bit faster.

From Nora: Be creative - it doesnt have to look ANYTHING like this. Make it fun, exceeds credit for making it fun/different.

From Cody: Competition: We will play each other's games on Thursday before break and vote- whoever has best game play, best visuals, most impressive get exceeds credit.

Exceeds:

  • Have floating logs
  • Have high score
  • Have reset button
  • Have sound

 

G-5 Flappy Bird (starter code)

Time for the wonderfully addictive flappy bird. Im sure you are familiar with Flappy Bird, but the idea is to keep the bird flying through obstacles (just pipes) that come quicker and quicker. The bird falls slowly, until you hit the screen (or in our case, space bar), in which case the bird flies up. This is a scrolling game in which the background and pipes move, but the bird stays in the same spot on your screen. The starter code has all the images and basic setup, but no code. That's your job.

    • Have the background scroll 
      • the backgroundImage is 800 pixels, but only shows 400 at a time.
      • give it a velocity and reset it occasionally
    • Have the bird fall down
      • exceeds to rotate bird, when it falls down or goes up
      • listen for the space to move the bird up
    • Have the pipe scroll
      • give them a velocity
      • in draw -> deal with resetting the pipe, always mantaining a decent gap size
      • Add anohter pairs of pipes (top/bottom)
    • Detect a collision
      • If so, reset everything.
    • Add sound - this is required for meets

    For exceeds:

    • add high score
    • get faster
    • something else!

     

    Final Project

    For those that want - during our last days, you can create your own project. You could do this in AppLab, GameLab or Legos. This is a lot of time, so it would need to be impressive. I can help out plenty to get you going or if you are stuck.
    Some examples from above: Tictactoe, Mario, Snake, World's Hardest Game.  I will get started on world's hardest game together.