Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

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?

1 decade ago by FragOnly

Hello,

I have a demo created at https://github.com/FragOnly/flappy-bird (http://microbialink.com/microbialink/flappy/ for playable demo) that displays a HUD element of points.

In lib/game/main.js the draw method might be an interesting point to start.

1 decade ago by sillypirate

Okay, I "sorta" got it runniing now. Now I just need my variable in main to update constantly to match my health variable of my player.

1 decade ago by sillypirate

just got it all working!
Page 1 of 1
« first « previous next › last »