top of page
Search

Log 15: Burning Out, Going to Need a Break Soon

  • Writer: Kassandra McCormack
    Kassandra McCormack
  • Jan 15, 2024
  • 7 min read

I got very little done the past couple weeks, as with working full-time at a job outside my field, looking for work inside my field, and working on this project at every spare hour of the day I'm starting to burn out, I had to reduce my time working on this and focus on me for a bit.


I did do some work, my unhealthy work ethic wouldn't let me fully relax. So I did some work on the UI, specifically the health bar.


ree

Inspired by a bit of Soulsborne, I decided that having the health bar (and eventually the musou bars) just jump to new values wasn't good enough. I also wanted to make the UI more visually interesting than flat bars across the screen, hence I'm going to put some sort of emblem or portrait of the player's character in that round section.


ree

This all started when I was working on finishing up the morph, specifically how hitting all the QTEs affected the player's health and activated Overpowered mode (which I'll be going back to finish in the coming week). I realized that depending on how health worked I would have to change how I interacted with the system.


One of my game's biggest inspirations was Hyrule Warriors (HW) because I think it did the Warriors formula really well and interesting (not that I've played EVERY Warriors game, but of those I have played HW is the closest to the kinds of systems I'm looking for). One of the things they do in HW with health is that, in addition to having health represented by hearts (and programmatically be an integer rather than a float), they increase your health not only through level ups but also side missions that you can undertake on the map. At the time I thought (and still think) this was a really cool idea so I started implementing it by changing the UI over to heart icons and to an integer basis.

ree

But, the more I thought about it as I worked, I realized that for my first project the whole side mission thing was beyond my scope. And the hearts looked ugly. So I trashed that and went back to the bars.


I wanted my UI to be interesting so I thought of not only other Warriors games, but any game that had a UI that I found memorable. The very first one I thought of was Kingdom Hearts (KH).

ree
From Yuuma Kuran's Pintrest page (apparently it's from DeviantArt, but the link was dead)

As you can see this is where I more or less landed. Granted, no Warriors game that I found has the rounded health bar around the portrait, but they do have curved bars for a third type of attribute (if there is one) that I'm not using. Plus they also have portraits of the player's character there in the corner. I decided that since I'm not doing a third usable attribute I'd make the health bar more interesting (and possibly the musou bar later). Plus a lot of the same themes are shared between Kingdom Hearts and Power Rangers, so the vibe will still fit.


The first thing I did was research how in the world I would make a curved health bar, particularly one that eventually turned into a straight bar across the screen. I found a bunch of tutorials about purely circular progress bars, but those wouldn't help me. I did find one forum post about specifically the KH health bar and some one pointed out that we could use custom materials to do this...but didn't go into more detail about how to do that. Eventually I found a very helpful tutorial that actually described the process: Unreal Concepts - Different Shaped Progress Bars (UE4) by Mathew Wadstein Tutorials. He even had the exact shape I wanted in his video. I also used his video Unreal Concepts - Dynamic Circular Progress Bars (UE4) to figure out how to make it expandable as the characters get more health.


Using the videos and some extra forum searching on the paths tool and some fancy brush/path interactions I was able to make a texture:

ree

Now, it's not the prettiest and as you can see in the gif at the top of the article there are some weird artifacts, but I never claimed to be an artist so serviceable is good enough for now. It took me over a day just to get this. I had to play around with a bunch of values and brush settings in order to get Gimp to go all the way from value 0 to value 1 around the curve and down the screen while at the same time making it so that it would grow and shrink at relatively constant rates and not appear to jump around while the underlying floats animated smoothly. I'm not entirely certain that I fully succeeded, but it looks close enough to my art plebian eye.


You may have noticed that the Gimp screen shot was much longer than the gif at the top of the post, and that is because I implemented concepts from the second mentioned video so now I can use only one texture but handle all values. And now when the player gets the maximum possible health pool it will extend all the way across the screen. This was important to me because few things make me feel like I've grown in power than seeing a ridiculously long health bar when I started with a miniscule thing.


That was all the first week of my burn out creeping up on me.


During the second week it came time to animate and add a bit of juice to the bar moving.


I wanted to have the healthbar snap to its new position, and then leave a sort of after-image or trail behind it that slowly caught up when damage is received. And when healed a preview of where the health is expected to wind up will appear as the healthbar grows to meet it. For a while I struggled with how I was going to get that done solely in the HUD's code as technically the character doesn't really need to know where the after-image/preview is, just the actual healthbar. I also tried to make the damage over time and regeneration happen inside a macro in the Stats component. Both of those proved too difficult for me so I wound up looking for any sort of forum or tutorial that would point me in the right direction.


Fortunately I found Advanced Health System in UE4/UE5 by Your Sandbox, and rather than point me in a direction, it showed me exactly how to do it. He did it entirely in the character blueprint so he could take advantage of Timelines. At first I wasn't a fan of doing it that way but as I continued failing at isolating the different parts of the algorithm in different components, and I was already burnt out and tired, I just lightly modified his algorithm. He had everything set up in a single timeline, but I split it into a separate healing and damaging timeline as they needed to move different variables at different times and I didn't understand how his worked (it was also slightly inefficient doing the same calculation multiple times instead of once).


Naturally my modifications meant I had additional complications. The damage was working fine right off the bat, but the healing healed WAY too much, and ironically wouldn't stack properly (pushing the heal multiple times would cut both off), it would also heal over the max amount.


Oh! That was something else I changed when I moved all the health stuff over to the character blueprint, instead of having a separate variable for the extra buff health since players can only get the extra health from being Overpowered, and can only enter that state from full health, I just have a single health variable that can go over the health maximum. That way I only need a check in the healing function that makes sure healing can't go over the max amount, but I can set it higher. Then the HUD reads that higher value and determines how much of the Extra Healthbar to show.


Back to my problems.


The first thing I fixed was the over-healing. All I had to do was insert a check if the proposed healing would be over max, and if so, change the delta health to the difference between current health and max. But that wouldn't stop the player from potentially wasting healing charges, so I put in a check that you can't activate healing if you would already be healing to max.


The lack of stacking was caused because I was clearing the variables, so everything got reset to zero each activation. All I had to do was remove a function call that, at this point, I don't even remember why I thought it should go there.


The fact that the healing was healing way too much was a bit more of a conundrum for a while. Part of the algorithm uses a timeline to scale a variable based on the predicted change in health over time. My problem was that when I went to set the new health value, I was adding to the current health value so that kept compounding, when what I needed to do was add to the original value of health before this iteration of healing started. That way the incrementing variable wouldn't compound on itself, and I would instead be starting my math from the same starting point rather than a shifting one.


This coming week, I think I'm going to take entirely off from development and relax. I don't necessarily WANT to, but essentially working two full-time jobs is exhausting and if I want to get this finished I need to recuperate. Making games is a marathon and not a sprint, unless it's a game jam, then I suppose it would be a sprint. Good thing this isn't a jam then.


Have a good week!

 
 
 

Comments


bottom of page