Jump to content

How would you handle "Healthbars" with babylon?


aWeirdo
 Share

Recommended Posts

Hello guys, 

I have been working on a small 1v1 multiplayer fighting game for learning purposes, 

I'm looking for ideas on how it would be best to handle health-bar's that floats above player's heads.

How would you build it up? sprites? billboard's? 

 

I'm thinking of something that have a fixed size,

and within that, health is devided into bars of 100 HP, 

so,

if a player have 1250 / 1250 HP, there should be 12.5 bars and the entire healthbar frame should be filled. 

if a player have 800 / 1250 HP, there should be 8 bars and they should fill (800 / 1250 * 100)64% of the entire healthbar frame, rest of it should be empty / transparrent.

 

I hope it makes sense and someone have a good idea on how to approach it :)

Cheers

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...