When players cannot compare how well they played in each game session, they aren't motivated to play again. Learn how to introduce a highest-score challenge.
- [Voiceover] Hi there welcome back…to the HTML five Game Development course.…We have created menu scene and game overseen…in the previous videos.…In this video we create a head of display…to display the games score.…Head of display is also known as HUD.…It is an user interface…that contains game information that's overlayed…in front of the screen.…We will work on the HUD html part.…
Then we add some styles to make the HUD overlay…in front of the game screen.…We need to allow canvas mouse event clicking…by disabling the HUD's elements pointer event.…Then we define functions to toggle the HUD visibility…and update the game's score.…At last we update the game's score from the logic…whenever the hero collects coins.…Let's open the game project in code editor.…
Open the index dot html file.…In the file we create a new div element…next to the game over screen.…It has a scene class and HUD id.…Inside the scene there is a text containing the score,…where we wrap the value with a span.…We need to refer to this span in java script…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Planning your first game
- Setting up your file structure
- Setting up HTML and JS
- Drawing basic shapes with EaselJS
- Implementing your first game object
- Creating the core game logic
- Adding graphics to your game
- Planning your second game
- Handling obstacle and hero collisions
- Making the hero run and jump
- Adding graphics and animations
- Polishing your final game
Skill Level Beginner
Q: Should the exercise files be run from a server or locally?
A: Please run the exercise files from a server as directed. The files will not work properly if run locally.
iOS Game Development with Swift 3 and SpriteKitwith Todd Perkins2h 52m Intermediate
1. Planning the Count Game
2. Creating the Core Game Logic
3. Polishing the Count Game
4. Planning the Rush Game
5. Moving the Character
6. Collision Detection
7. Building Levels
8. Polishing the Rush Game
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.