https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript
Use your Left and Right arrow keys to control the paddle. If you prefer to use a mouse cursor, that option is available to you.
For Make School's Backend Web 1.2 course.
Objects in the game:
- Heads up display
- Game Board
- Bricks
- Ball
- Paddle
- canvas
- element: References the HTML Canvas Element
- context: References the 2D-JS Canvas Context
- state
- score: Attain the highest score you can
- lives: If this reaches zero, game over
- Mobile Objects: Visible entities that move and interact
- Static Objects: Visible entities that are overlay-only
- Fields of Effects: Invisible areas that trigger mobile objects
- Ball: This thing bounces around and destroys bricks on hit.
- Brick: This thing gives you points when its destroyed.
- Paddle: This thing bounces the ball.
- HUD
- Pause Overlay
- Generic Wall Field: Stops objects from passing + bounces
- Bottom Wall Field: As above, but also destroys balls on hit.