Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"


0 (0 Likes / 0 Dislikes)
Making all the other Objects Create the Player class. Add sound effects to the player. To do this, create a variable for a certain sound effect. All the sound effect of this game uses the SoundEffect class. Then in this variable, put the location of the sound effect. Inside the update method of the Player class is horizontal collision bound of the spaceship. Now add all the key events required for the player. These key vents include keyPressed and keyReleased. Create the checkCollision method. Inside the method, make the necessary code on what will happen if an enemy touches the spaceship. This part creates the health points of the player. So if the player collides with the enemy, health points of the player will decrement. If the health points reaches 0, the game will be over. Now draw the player in the game panel. Create the KeyAdapt class for key events. The velX variable is the velocity of the player. Create the Enemy class The speed is the initial speed of the player. Pressing the spacebar must shoot missiles from the spaceship. And while it is pressed, a sound effect must play. Create the getBounds method to set the bounds of the player. Create a playAgain method in the Player class just like in the GameFrame. Go to Enemy class. Then put the image required for the enemy. For all the images used in the game, a ResourceLoader class was made with the following codes. The ResourceLoader class points to the location of all the images used for the game. Create checkCollision method with the following codes. The checkEnd method contains the code what will happen when the enemies reaches the spaceship's domain. If an enemy reaches it, the game will be over. Create a playAgain method. Create the classes for the power ups and power downs. The code for those are similar to the enemy. Edit the sound effects and all the other methods for its desired function. Edit the following methods to function as a power up. In this class, increment the playerHealthbar by 1. If the player shoots this power up, it will add 1 to the health point of the player. Do these as well to other power ups and power downs. The HealthDown class is for the chicken that lessens the health point of the player. The comment in the following lines shows its functions. If the player shoots these power up multiple times and the health point reaches 0, the game will be over. Create the score power up. If the player shot these, it will add 20 points to their score. Create the class that reduces score by 20. Edit all the necessary elements for it to function properly. Double check all the power ups and power downs. Create another form that shows the player's score and the high score.

Video Details

Duration: 9 minutes and 41 seconds
Language: English
License: Dotsub - Standard License
Genre: None
Views: 0
Posted by: c.ibasco on Mar 21, 2018

Caption and Translate

    Sign In/Register for Dotsub to translate this video.