1 decade ago by sillypirate
I've been searching these forums for hours on how to apply my healthbar HUD. I'm making a sidescroller similar to mario or megaman-x and I need my health to display in the form of a bar in the top left at all times. I have a sprite sheet for image already designed for each amount of health a player can have. The most I've been able to do is display the 0 health bar and nothing else. I've tried drawing straight from main.js. I've tried creating a hud.js entity. I've followed every example I've been able to find on these forums. I even tried following "Introducing HTML5 Game Development" book. Can someone please tell me how or show me a successful example of how to do this?