Creating a Balance Mechanic (Similar to Tony Hawk)

Hi Guys

I’ve been scripting a little skateboard game for some time to learn Unreal, based on Tony Hawks Mechanics. I’ve come to a dead end trying to find a way to create a balancing mechanic - does anyone have an idea of where I would even start to build the below?
Thanks a million

https://giantbomb1.cbsistatic.com/uploads/original/10/103881/2665747-balance%20meter.png

Generally speaking, you’d have an algorithm calculating balance driving a widget that visualises said value.

You want to design the mechanics of keeping something in (im)balance or a widget that represents it? Or both?

Thanks for the response!

Really, I’m just looking for the algorithm or the general nodes I should be looking at to start as a jump off point. Implementation and widgets can all come later of course - I guess I’m looking for a value that goes up and down based on key strokes that over time becomes more rapid / sensitive to input (so the algorithm). Hope this makes sense!

##Balance Player

  • every frame we add a small random value to Balance which is then interpolated to avoid rapid swings - Interp Balance; this creates an offset in the range of -1 <> 1
  • the player can counter this offset with the left or right mouse button - Recovery Input
  • the larger the offset, the more difficult it is to counter it, so if you react too late, there may be no coming back - Losing Balance; this goes away if we manage to recover, though

##Check Player Balance

  • Safety Threshold: if Balance is in this range, the Losing Balance value is not applied and we’re somewhat stable, maintaining balance is pretty effortless here
  • Dead Threshold: the Balance has swung beyond it and we’ve fallen

Added debug to visualise things, and comments to make things clearer, hopefully), config and an example of optional mechanics.

Image from Gyazo

Project link:


This obviously needs more work and a lot of tweaking. Translating it into a widget display should be fairly straightforward, though. It all revolves around Interp Balance float.

Should have added that I’ve never played any skateboard games. So this might be a complete miss!

Dude, I’m actually blown away by how cool of you it was to go that far into detail about what I was looking for. Thank you so much, I’ll be spending the rest of the week unpacking this and figuring it out - I cant thank you enough for being so kind to do that. I’m not much of a blueprint maker but if you ever need some game assets modeled and textured by way of thanks you have my profile information.

Cheers again, can’t wait to figure out what you’ve put forward.

And here’s how you could ask the widget to handle the display:

  • easy way to align and anchor it with Ctrl + Shift

  • we’ll be shifting that border in the canvas space over a circumference of a circle
  • it’s a rotated, shifted 2D vector and the border is placed at its head

And it can be hooked up like so:

Image from Gyazo

1 Like

Good luck, do tell if something makes no sense here.

Thank you so much Everynone, I’ll not forget just how sound you are to help me this much.

I have a small question. Why the character always faces toward the camera when I hit play, despite the fact the character’s back is facing the camera by default.
Thanks in advance!

The debug rotates the mesh here:

It was probably done to record the little animation above, so we can look at the mannequin’s pretty face rather than their glutes.

1 Like

I’m a total beginner, can you explain more what I should do with those number in order to rotate the character around? Because when I change the Z axis to 1 it doesn’t seem to work.

Ooh never mind I got it, I just unplug “get actor right vector” node. BTW thanks Everyone a lots!