Difference between revisions of "Dodge game"

From WLCS
Line 27: Line 27:
 
** If the player collides with a falling object (i.e. if the object hits the player), then there should be a game over message
 
** If the player collides with a falling object (i.e. if the object hits the player), then there should be a game over message
 
** If the player successfully avoids 500 or more falling objects, then there should be a win message
 
** If the player successfully avoids 500 or more falling objects, then there should be a win message
 +
* Health meter
 +
** 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
 +
** The health meter should be a sprite with multiple costumes (~10 total), and each costume is smaller than the one before
 +
** When the player is hit, broadcast a message to the health meter to tell it to change costume
 +
** You lose the game when your health hits zero
  
 
'''Advanced Features:'''
 
'''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
 
* 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)
 
** Add items that randomly drop that are good for the player (e.g. slows down the falling objects, temporary invincibility, speed boost)
* Lasers - fire back
 
** Add the ability to fire a laser back at the falling object so that they cancel each other out
 
* Health meter
 
** Instead of losing from a single collision, add a health meter to your game.  If the player is hit, then your health decreases, and you lose if your health hits zero
 

Revision as of 08:03, 13 November 2012

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
    • Your player must be restricted to the bottom of the screen
    • Your player must only be able to move to the left and right
    • The player may NOT leave the screen (i.e. there are walls on the left and right edges of the screen); however, if you want, you can make the screen wrap for the player.
  • Falling objects
    • Place an object at the top of the screen
    • The object should fall (move) automatically to the bottom
    • 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
    • As the game progresses, more and more objects will fall from the top (continue reading below)
  • Successful dodge counter
    • Every time the player successfully dodges a falling object, increase a counter on the screen by one
    • HINT: A player successfully dodges if the object hits the bottom and you move it back to the top
    • When the dodge counter hits different ranges, the levels will get harder with more objects. (continue reading below)
  • Increasing difficulty
    • When the dodge counter starts, only 1 object should be visible
    • If the counter is greater than 10, then another falling object should start to fall
    • If the counter is greater than 20, then another falling object should start to fall
    • Increase the difficulty progressively as the game plays. You should eventually have at least 8 objects on the screen
  • Collisions
    • If the player collides with a falling object (i.e. if the object hits the player), then there should be a game over message
    • If the player successfully avoids 500 or more falling objects, then there should be a win message
  • Health meter
    • 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
    • The health meter should be a sprite with multiple costumes (~10 total), and each costume is smaller than the one before
    • When the player is hit, broadcast a message to the health meter to tell it to change costume
    • 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)