A breakout game has elements in certain positions on screen; you need to place them correctly.
- [Instructor] Hello and welcome to video 2.3.…In this video, we're going to discuss about…game stage creation and object positioning.…In the previous video, we've created basic elements.…Now we're gonna position them in the correct…location onstage and in the case of the brick,…we're going to create a brick reg instead of just one.…In order to create the brick reg…we'll need to modify the create brick function…we created in the previous video.…
We're gonna add, as parameters x and y.…And instead of using hard code values, like 50,…we're gonna send the values, according to parameters…provided by the function header.…We'll remove the destroy brick call,…because it was used as a demonstrate in the previous video.…And now we'll create brick grid function.…I'll paste it and I'll explain what it does.…
The create brick grid function…will run a nested loop.…Nested loop means that a loop…will run inside a loop to create the correct grid.…Now, the I value will be in charge…of the x values of the bricks.…And the J value will be in charge…
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