• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Asset - Scripts UBG Simple Health Bars

Binsk

Member
healthbar_icon.png

Would you like to be able to throw together some health bars as easily as possible? Do you also want flexibility so they can look just like you want as well as documentation to show you how to get there? Well perfect, you found what you needed.

Yoyo Marketplace
Upset Baby Games
Itch.io Store

Before I introduce this extension further let me just point you to the available online documentation so you can better see what is available.

Initial Setup

It just takes a single function call to generate a functioning health bar. Of course, there are setter and getter functions provided to further tweak each bar to your needs, but if you want to get going fast it just takes one call.

All health bars share a common parent but are given their own creation scripts to keep things easy to follow.

Features

Each health bar supports certain base properties including:
  • Auto-calculated edge alignment
  • Sprite-based rendering
  • Mask support for odd-shaped health fills
  • Fill / Drain blending
  • Animated fill / drain effects
  • Animations handled in real time not game time
Some health bar types also contain more than one rendering effect mode and extra properties. For example, the current available health bar types are these:
  • Icon - Represent health via icons like in the old Zelda games! Supports auto-wrap of rows and animated fill / drain effects!
  • Bar [Rectangle] - Represent health with a sprite that can fill along a horizontal or vertical axis! Supports fill masks and two animation modes!
  • Bar [Circle] - Represent health with a sprite that can fill in a circular motion between any two angles! Supports fill masks and two animation modes!
These three types of health bars should easily fill most if not all of your needs. However, if there is a type of health bar you would like implemented, let me know!

Platform Support

This system is programmed in native GML for maximum compatibility. It has not as of yet been tested on mobile or HTML5 targets but was designed with them in mind. Some blend-modes are used that will require WebGL be enabled for HTML5 for this extension to function.
 
Last edited:

Binsk

Member
Finally got the Yoyo store to accept my extension submission. It is available on the Yoyo store as well, now.
 
Last edited:
Top