You need to add graphics to the game; check and decide the dimensions of each game object and draw them.
- [Narrator] Hello and welcome to Section 3, Game Logic Part 1. In this section, we're going to discuss the basics of creating the game logic of the Breakout game. Welcome to Video 3.1, Game Logic Overview. The Breakout game is a pretty simple game. The player is able to move using the mouse or the keyboard the paddle at the bottom.
The idea is to get the ball to hit all the bricks in the top third of the screen. Once all the bricks are gone, the player levels up or the game is over, whichever you choose. If the ball falls beneath the paddle and basically exits the screen from the bottom, the player loses a life. So, for example, here I can play for a couple of seconds, and we can see that whenever I hit the brick, the brick is gone, and if I miss the ball, I lose a life.
I started out with three lives, now I have two lives, and since I've hit seven bricks, and I'm getting 100 points for each brick I hit, I have 700 points. Now in this section, we're gonna discuss about the logic of how the ball basically moves around the screen, and we're basically gonna create a game similar to the one I just showed you. Congratulations, now you know the game logic which we need to implement in the game itself.
In the next video, we're gonna actually add the code required to making this game work.
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Playing sounds in various browsers using SoundJS
- Tweening objects using TweenJS
- Creating graphic assets and basic animations
- Game stage creation and object positioning
- Adding the basic game logic
- Add the game physics
- Adding mouse and keyboard controls
- Debugging with breakpoints in Chrome
- Debugging on Android and iOS
- Character movement and input handling