GameMaker (all)
Icon

Circular and Arc-Shaped Bars

Dan Blain

You must be logged in to obtain assets

Description

Want to spice up your game's GUI a bit? Looking for a different way to present values than a simple rectangle?

This script package will let you do that, using circular and arc-shaped bars and meters.

Some uses include:

  • Health and magic bars
  • Loading and progress bars
  • Experience meters

...And anything else you can think of!

The package includes scripts for drawing bars and meters in a circular fashion. With these scripts, you can adjust bar width, radius, angle, orientation and colour. You can even fill the bar with a gradient or apply textures!

The following functions are included:

draw_bar_circular(x,y,fill_percentage,bar_col,bar_alpha,bar_radius,bar_width,start_angle,clockwise,back_col,back_alpha)
draw_bar_circular_simple(x,y,fill_percentage,bar_radius,bar_width,start_angle,clockwise)
draw_bar_circular_texture(x,y,fill_percentage,bar_tex,bar_radius,bar_width,start_angle,clockwise,back_col,back_alpha,tex_tiled)
draw_bar_circular_gradient_w(x,y,fill_percentage,bar_col_inner,bar_col_outer,bar_alpha_inner,bar_alpha_outer,bar_radius,bar_width,start_angle,clockwise,back_col,back_alpha)
draw_bar_circular_gradient_l(x,y,fill_percentage,bar_col_start,bar_col_end,bar_alpha_start,bar_alpha_end,bar_radius,bar_width,start_angle,clockwise,back_col,back_alpha)
draw_bar_arc(x,y,fill_percentage,bar_col,bar_alpha,bar_radius,bar_width,start_angle,end_angle,clockwise,back_col,back_alpha)
draw_bar_arc_simple(x,y,fill_percentage,bar_radius,bar_width,start_angle,end_angle,clockwise)
draw_bar_arc_texture(x,y,fill_percentage,bar_tex,bar_radius,bar_width,start_angle,end_angle,clockwise,back_col,back_alpha,tex_tiled)
draw_bar_arc_gradient_w(x,y,fill_percentage,bar_col_inner,bar_col_outer,bar_alpha_inner,bar_col_outer,bar_radius,bar_width,start_angle,end_angle,clockwise,back_col,back_alpha)
draw_bar_arc_gradient_l(x,y,fill_percentage,bar_col_start,bar_col_end,bar_alpha_start,bar_col_end,bar_radius,bar_width,start_angle,end_angle,clockwise,back_col,back_alpha)

In addition, this asset pack includes a demo to help you better understand these functions. The scripts are headed with helpful instructions, informing you on how to properly use them.

Hope you like it!

End User Licence Agreement (EULA).

Age Rating: 4+

Versions

GMS1 - Version 1.0.0. Published December 8, 2017

GMS2 - Version 1.0.1. Published October 11, 2018

Revised version for use with GameMaker Studio 2.

Changes made for compatibility: * texture_set_interpolation() has been replaced with gpu_set_texfilter() * texture_set_repeat() has been replaced with gpu_set_texrepeat()

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait