Join Daniel Albu for an in-depth discussion in this video Creating the scoring system, part of Advanced HTML5 Game Development.
- [Narrator] Creating the scoring system.…We are going to create a text field on the stage,…which will represent the score and remaining number of lives…We're going to add the scoring logic,…and we're going to add the lives logic.…Now if you recall in the previous section,…this was the way our game looked.…As you can see, when the ball reaches the bottom,…we don't lose any lives, and it just continues bouncing.…On the other hand, when we actually hit a brick,…we don't see any score added to our score.…
We don't see anything basically.…We don't have any visual representation of either the lives,…or the score we currently have.…So that's what we're going to add now.…First of all, we're going to add three new variables.…One of them will be the score,…which at the beginning should be zero.…The other should be lives, which at the…beginning will be three.…And the third will be scoreText.…The scoreText will be the visual representation…of the score and the lives.…
It will be a text field which will create and create a yes.…
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