[Tips] Create HP bar for your game

Talk about making games.

[Tips] Create HP bar for your game

Postby Chai » Sat Nov 20, 2010 7:26 am

Here is the file how you create HP bar for your game.
in the Example press left or right to increase or decrease your Hp point
Attachments
HPbar_CHAI.zip
(227.22 KiB) Downloaded 85 times
HPbar_CHAI.png
User avatar
Chai
 
Posts: 361
Joined: Sat Apr 30, 2005 2:26 pm
Location: Thailand
Score: 30 Give a positive score

Re: [Tips] Create HP bar for your game

Postby skydereign » Sat Nov 20, 2010 8:09 am

The only improvement I'd make is using the nframes variable, and perhaps a #define setting the max hp. That way the draw of the hp bar is completely hands off. nframes holds the number of frames in the current animation, so exactly what 40 did. Thanks for posting this, forgot to make the ged I posted for Wertyboy dynamic.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: [Tips] Create HP bar for your game

Postby DST » Sat Nov 20, 2010 5:42 pm

viewtopic.php?f=6&t=5756

Use only one image to make a meter - simpler this way.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest