HAPPY NEW YEAR
Quote: "game balance, like character levels, damage damage, health etc"
A simple 2d Horizontal health bar would need to apply to a sprite
#constant red=MakeColor(255,0,0)
#constant green=MakeColor(0,255,0)
#constant white=MakeColor(255,255,255)
function createTexture(ammount as integer)
SetClearColor(0,0,0)
ClearScreen()
DrawBox( 0, 0, 200, 20, red,red ,red,red, 1 )
DrawBox( 0, 0, ammount, 20, green,green,green,green, 1 )
DrawBox( 0,0,200,20,white,white,white,white,0)
Render()
img = getimage(0,0,200,20)
SetImageTransparentColor( img,0,0,0 )
Swap()
endfunction img
The above horizontal health bar could be used for 3D by simply creating a plane at the beginning of your proggy
and applying it as a texture. The trick is you have to attach the plane to your players and before every sync set its rotation
back to face the camera and then attach again. Replacing the texture with the new image and finally deleting the old
PS you may wish to create an array of health images for simplicity and speed
Im not sure there is any magical amount of damage etc a player should take it really depends on the game and is up to you
there are other examples of health bars
https://forum.thegamecreators.com/thread/222027
or you could look on the shader thread there's been some really good shaders that may be the fastest way to achieve a
health bar depending if the game is for android or not