First talk about how to add sound effects and BGM for the game, as follows:
1, the audio file must be Ogg Vorbis (.ogg) or MPEG-4 AAC (.m4a) format, is allowed to be added.
2, by sound or music file, right-click the project folder bar and select Import to import sounds or import music sound.
3, add audio objects to the project, and add the event to play audio.
Pay special attention to the MIME type: For the server to correctly send the audio file, you must set it up with the correct MIME type. If the server is sending the wrong MIME type, the audio may not play in some browsers.
Game over method requires the text at the end of the game, add the following:
the following figure, Game over text in the game and start the process is not visible, but when the player is a monster hit, when the end of the game, Game over text will be displayed .
To increase the difficulty of the game, we can improve the speed monster, as follows:
First, add a variable to the game (click Add variable), to the variable name and set an initial value.
Set whenever bullet monster, the monster will increase the movement speed of 1, so the game will be more and more difficult to avoid the games can keep playing embarrassment, but also adds some challenge.