uzi Posted October 23, 2019 Share Posted October 23, 2019 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 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 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. Adjust the checkIfLoss method to show your new loss screen instead. Adjust the if block in the update method on EnemyManager, to change state to your win screneobject. Even more bonus, add a menu screen that tells the player how to play. Challenge 2. Add a UI 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 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. 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 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. Have each wave progress faster too (+ 8 each Y increment over + 5 for example). Play with the numbers a bit until it feels right. tutorial-space-invaders-gh-pages.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.