- 5
- Posts
- 14
- Years
- Seen Apr 12, 2010
I wasn't really sure where to post this, but I thought this was a reasonable place, if I was wrong please move it.
Anyways, so basically right now I am working on a FR/LG re-make MMORPG. It is 100% browser-based, you use your arrow keys to move around, I might expand the game to multiple regions at some point, but right now I don't even have a completely working map (of any degree). I was reading around, and found some stuff, but it was all tutorials for a specific program, and I am not using a programming I am using the languages Javascript /w Ajax and PHP.
So, now that I have given a basic background, on to my question. How does the HP bar work? Obviously when you lose HP the green goes down and eventually changes to yellow then red, but how do you calculate how much it should go down? I was thinking something like this:
total_hp/segments_in_hp_bar
so basically, lets say for examples sake, you had a max HP of 10, and there was 10 segments in the bar, so each time you lost 1 HP you would see one less segment and that segment would just be replaced with black (as is the background color for the HP bar). Is this how the bar is actually made, or is it entirely different? And if it is made this way, how many segments are there? But if it is different could someone explain how it works?
Thanks for reading, any help is greatly appreciated :D
Anyways, so basically right now I am working on a FR/LG re-make MMORPG. It is 100% browser-based, you use your arrow keys to move around, I might expand the game to multiple regions at some point, but right now I don't even have a completely working map (of any degree). I was reading around, and found some stuff, but it was all tutorials for a specific program, and I am not using a programming I am using the languages Javascript /w Ajax and PHP.
So, now that I have given a basic background, on to my question. How does the HP bar work? Obviously when you lose HP the green goes down and eventually changes to yellow then red, but how do you calculate how much it should go down? I was thinking something like this:
total_hp/segments_in_hp_bar
so basically, lets say for examples sake, you had a max HP of 10, and there was 10 segments in the bar, so each time you lost 1 HP you would see one less segment and that segment would just be replaced with black (as is the background color for the HP bar). Is this how the bar is actually made, or is it entirely different? And if it is made this way, how many segments are there? But if it is different could someone explain how it works?
Thanks for reading, any help is greatly appreciated :D