Dodge game

From WLCS
Revision as of 08:34, 12 November 2013 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Objective:

  • Design and implement a game where a player moves side to side on the screen in order to dodge falling objects

Directions:

  • Find a sprite image or draw a sprite for your player
  • Find an image or draw a shape for a falling object (e.g. spike, bomb, etc.)
  • Side-to-side movement
    1. Your player must be restricted to the bottom of the screen
    2. Your player must only be able to move to the left and right
  • Screen-wrapping
    1. When the player goes past the right side of the screen, he/she should appear on the left side of the screen
    2. When the player goes past the left side of the screen, he/she should appear on the right side of the screen
  • Falling objects
    1. Place an object at the top of the screen
    2. The object should fall (move) automatically to the bottom
    3. If an object hits the bottom, then move it back to the top
      • Randomize the x-coordinate when you place objects back at the top
    4. As the game progresses, more and more objects will fall from the top (continue reading below)
  • Successful dodge counter
    1. Every time the player successfully dodges a falling object, increase a counter on the screen by one
    2. HINT: A player successfully dodges if the object hits the bottom and you move it back to the top
    3. When the dodge counter hits different ranges, the levels will get harder with more objects. (continue reading below)
  • Increasing difficulty
    1. When the dodge counter starts, only 1 object should be visible
    2. If the counter is greater than 5, then another falling object should start to fall
    3. If the counter is greater than 10, then another falling object should start to fall
    4. Hint: Use the "wait until <>" block
    5. Increase the difficulty progressively as the game plays. You should eventually have at least 8 objects on the screen
  • Collisions
    1. If the player collides with a falling object (i.e. if the object hits the player), then the health meter should decrease (see below)
    2. If the player successfully avoids 300 or more falling objects, then there should be a win message
  • Health meter
    1. Instead of losing from a single collision, add a health meter to your game. If the player is hit, then your health decreases a little bit
    2. The health meter should be a sprite with multiple costumes (~10 total), and each costume is smaller than the one before
    3. When the player is hit, broadcast a message to the health meter to tell it to change costume
    4. You lose the game when your health hits zero

Advanced Features:

  • Lasers - fire back
    • Add the ability to fire a laser back at the falling object so that they cancel each other out
  • Power-ups - Good items
    • Add items that randomly drop that are good for the player (e.g. slows down the falling objects, temporary invincibility, speed boost)