HUD Rework and Physics noodlin’

The old hud was starting to bother me so I leaned more into a simplier hud that I can expand upon later.

The original hud I was going for a kind of skewed look as if you were wearing a helmet and the information was displayed on these green dots on the screen. While a cool concept I think it was too janky and looked like mspaint levels of cleanliness. Also you can see here if I have a non-standar resolution the alignment would always be misaligned to the screen. The new hud (which I would say is still a developer hud) I went for a cleaner approach:

Nothing too crazy just a health bar and some text on the corners. But the best part:

The positioning stays consistent regardless of dpi/resolution.

I achieved this by avoiding the “scaleBoxes” I was using before and just used horizontal/vertical boxes with spacers in between:

I also adjusted my dpi scaling rules:

I also found out I had a bad strand in my blueprint spaghetti from months ago:

That circled red block is what determined the direction of damage when a bullet was fired. I was doing StartVector – EndVector instead of doing EndVector – StartVector which was inverting the direction of damage as the “direction Of Damage” was relative to the attacked instead of the attacker.

Why does this matter? Unreal has a damage type system which makes it easier to set impulses from different types of damage. I have a bullet type that I wanted to push objects, when the vectors are swapped:

When the math is correct:

(I realize the window is awkwardly small in these videos…)

I also wanted to touch up bot “death” (destruction? Disassembly?) and I saw I never made a physics asset for the Assault rifle with no stock, after that fix plus the impulse fix things start to look much nicer.

The legs spawning detached is still a bit annoying. That issues comes from the physics asset which I spent so much time with a month or two ago I eventually gave up and kept it a “this just works so don’t touch it” kinda stasis.

If you look at the tree to the left you can see there’s a “Body” bone which holds the main collision box then there’s “BackLegXX” bones which I have attached to the body bone and to the bottom legs. However, there’s nothing in between for the thighs of the bot, which is why in the video above you see the legs swinging free. I’d need to remake this guy by going through each leg and adding a box, connecting it to the body or previous leg and ensuring everything doesn’t collide with itself. There’s an “auto-generation” feature which I’ve had little success with so this will end up just being a big time sink.

Eventually I want bots to have a chance to detonate in a electrical fireshow which I think would add to the dynamic nature of fights. Also I need to do a re-write of the AI to add:
– AI Teams
– Team Positioning Coordination (so the bots don’t just all choose the same spot)
– Goal Zones (for some other ideas I’m working to add a meta level to gameplay)

Leave a Reply