Jump to content

Space Invaders Challenges


Recommended Posts

I having a hard time going through the challenges. I'm not very good with Java but so Im having a hard time. Can anyone give me their input?

These are the challeneges I need to go through. I have attached the game that loads up from index.html

Challenge #1

Add a proper win & loss screen

  1. These screens can be made by adding additional ScreenObjects to the game, register them in game.js, and then changing state. For what states to use for the win & screen, look at the states available: http://melonjs.github.io/melonJS/docs/me.state.html
  2. The win and loss screen can contain a sprite, or text, or both. Whatever you wish really. Be sure to look at me.Font and me.Sprite. To display a me.Font object, use an instance of me.Renderable that contains an instance of me.Font, and implement the draw function to invoke me.Font#draw.
  3. Adjust the checkIfLoss method to show your new loss screen instead.
  4. Adjust the if block in the update method on EnemyManager, to change state to your win screneobject.
  5. Even more bonus, add a menu screen that tells the player how to play.

Challenge 2. 

Add a UI

  1. Add an enemy counter, and enemy velocity to the top right/left corner of the screen. These properties can be retrieved via: game.playScreen.enemyManager.children.length game.playScreen.enemyManager.vel
  2. Again look at me.Font, and implement a renderable for drawing text. Try to only use one class that extends renderable that can be used for both UI pieces.
  3. Add a score element. Keep track of the score on the play screen. Update it each time an enemy is killed. Remember that enemies are removed from the collision handler on the laser.

Challenge #3

Add the concept of levels

  1. After you defeat a wave, instead of refreshing the same wave, do a new wave the starts faster. The main logic here will be keeping wave count on the game.js, and increase it after each win. Then use that count in the enemy manager to configure the velocity.
  2. Have each wave progress faster too (+ 8 each Y increment over + 5 for example). Play with the numbers a bit until it feels right.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...