HTML5 Canvas game - Visualizing player health
I recently built a JavaScript game for which I needed a way to visually show the player's health. The game already had a HUD where the health information was displayed. But I wanted a better way to inform about the amount of health left and I chose to implement this like a meter widget.
Below is the final result (also you can see it in live in the game):
Written by Veera
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Web
Authors
johnbender
79.22K
hector
60.43K
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#
