YesNoOk
avatar

Point me in the right direction for lifebars/HUD? (Read 27238 times)

Started by Tyadran, September 06, 2017, 03:33:53 am
Share this topic:
Point me in the right direction for lifebars/HUD?
#1  September 06, 2017, 03:33:53 am
  • *
    • USA
So I've been working on my first MUGEN game for a while, and I figured it's about time to create some fitting lifebars and fix up the HUD in general. However, I'm having trouble finding some good resources to help me do the things I'm trying to accomplish, so maybe I'm not looking in the right places. Even without a direct answer, a link to some good tutorials (preferable text-based) or what I should be searching for would be great.

Below is a mockup of what I'm trying to achieve, followed by some specific points. Ignore the fact that the icon, name, and sprites don't match, I just used what I had already screenshotted and the longest name I could think of.



1) I want to be able to overlay the little arrows and bar indicators on the super meter. I'd also like to know if there's a way I can change when the sound effect for gaining meter is played, since my characters have varying total meter lengths (1800, 2100, or 2400). Otherwise I'll just take out the noise, but I'd rather not.

2) The entire black section at the top (marked off by the white line underneath and accompanying lightning bolt) is intended to be one big piece of the HUD, and I'm not sure how I should go about using a backing image like that with the tools available.

Everything else should be pretty clear from the mockup, I think. If I need to handle anything like the super meter/noises in the actual character, I can do that since this is a fullgame project that I'm making all the characters for.

Thanks in advance for any help, and please keep in mind I know next to nothing about working on lifebars/HUD so I'm not starting from a place of knowing how to work with them.

-Tya
Re: Point me in the right direction for lifebars/HUD?
#2  September 06, 2017, 05:01:06 am
  • ****
  • Retired
  • Terminally Online
    • New Zealand
    • network.mugenguild.com/devon/
I'll have a lengthy answer for you soon but I'll just say everything you want is possible through the fight.def. I suggest having at look at one through Fighter Factory, try not to get too confused and hang tight lol.
Re: Point me in the right direction for lifebars/HUD?
#3  September 06, 2017, 05:06:25 am
  • *
    • USA
Okay, thank you! I poked around at fight.def some, but couldn't make a whole lot out of it and couldn't find any documentation like there is for characters.
Re: Point me in the right direction for lifebars/HUD?
#4  September 06, 2017, 05:58:31 am
  • ****
  • Retired
  • Terminally Online
    • New Zealand
    • network.mugenguild.com/devon/
Sorry about the wait, it's hard to find the right words:

So this is (probably) how you're going to split your lifebar, it may look odd because it's only the p1 half but with mugen you can flip everything over on the p2 side with p2.x.facing:



So as you can see, I've cut arrow shapes into the power bar, in MUGEN the power metal decreases by masking the bar rather than resizing it, so in practice you can have odd shaped bars that won't warp as health goes down. If you want the yellow parts of the bar to only show up when you've reached the corresponding level you can do that as well through font manipulation. That's a different topic all together.

But to answer the question, you don't need to overlay the arrows, just simply integrate them into the bar or the background.

As for the music, you can change each level up sound in this code:
Code:
[Powerbar]
; --level sounds---
level1.snd = 21,0
level2.snd = 21,0
level3.snd = 21,0
You'll have to find or compile your own snd file though.

Also there is no documentation for lifebars as far as I know plus you get minimal help in the fight.def.
Re: Point me in the right direction for lifebars/HUD?
#5  September 06, 2017, 06:05:27 am
  • *
    • USA
Okay, thanks! That isn't the question I had about the sounds, though. By default, they play for every 1000 power, correct? But the issue is that my characters can have either 600, 700, or 800 power per level. I want to know if there's a good way to make the sound effects play at the proper point for each character.
Re: Point me in the right direction for lifebars/HUD?
#6  September 06, 2017, 06:37:31 am
  • ****
  • Retired
  • Terminally Online
    • New Zealand
    • network.mugenguild.com/devon/
I assumed 1000 power per level was hardcoded into the engine.
Re: Point me in the right direction for lifebars/HUD?
#7  September 06, 2017, 06:40:09 am
  • *
    • USA
You're probably right. At least from the sound effects standpoint, since you can choose the moves to use whatever you want. I'll just remove the sound effects for now, then, and maybe find a workaround later.
Re: Point me in the right direction for lifebars/HUD?
#8  September 08, 2017, 10:14:57 pm
  • ****
    • USA
    • twitter.com/inktrebuchet
Since this is a full game, couldn't you just take the sound out and then have it trigger in the characters instead?
Re: Point me in the right direction for lifebars/HUD?
#9  September 08, 2017, 10:33:17 pm
  • *
    • USA
Since this is a full game, couldn't you just take the sound out and then have it trigger in the characters instead?

I'm planning to take the sound out, but I don't know how I would go about putting it into the characters. If you had a suggestion, I'd be happy to hear it.