Skip to content

Game Cycle

Oleksandr Malakhov edited this page Jul 25, 2018 · 2 revisions

Upon load of the html file, the game start with the preloader:

Preloader

Here all the assets of the game are being preloaded and the player sees an loading animation. After everything is loaded it switches to the title scene.

Title

On title the player gets options to start the game, visit the credits or the help scene where the keys are explained and to switch on music and sound. Those are muted upon load.
Generally the player will start the game with Space

Level / Game

Here is where everything happens. First the player sees the brick pattern and also the player sprite and the ball sprite.

The game is paused at first and the player has to hit space again to start the game, upn which the ball starts moving. The game runs so long until the player beats all the bricks with his sword attack/slide by directing the ball to the bricks or if he looses all the lifes

  1. first option is that all the bricks are cleared from teh filed. Then the player gets the option to press key C and start the next stage, where the next brick pattern is loaded. The lives aren't being refilled. This process is repeated so long until the player dies.
  2. loosing all the lives / death. Upon death the game over funciton starts from the gamehelpers.js and the player gets his final score. The user gets promted to repeat the game with key C to get a higher score

Generally the player has always the option to stop the game with esc and leave to title with repeated esc. Also P and M keys are available in every scene which toggle music and sounds.

Clone this wiki locally