2 years ago

Here's a little bit of insight into my UI Juice.


It's a really simple system, first I check for the button press, which is grouped into direction or confirm.

Then Instead of having the code repeated throughout the whole thing, if you can't go left or right I set a type value to "H", for up or down it's "V", if it's the confirm button it's "STILL".

I also have a temp value to determine the direction, forward or back stored as a 1 or -1, with an initial default as 0.

Then at the end of the button press code I run a script with those 2 values which reset and fires off a lerp.

The orientation tells it which value needs to be lerped, either Horizontal or the Vertical with the direction value being multiplied by the lerp amount to invert it if necessary.

The lerped value is then applied to the draw x/y or scale of the relevant UI part! THEN IT GOES BOING!



3 comments

Loading...

Next up

Help my quests, so empty

Magic rework is working! Added in the text info for movement types.

Just gotta fill in some sprite gaps, and a couple bits of data, rearrange and cleanup some look up/reference code.

HUH! Are worms bugs? Because I've got a bug here...

Infinite WORMS!

Madeline is the main protagonist of the mountain climbing platformer, Celeste. The game has been praised for its visuals, gameplay, and introspective narrative. The game's creator Maddy Thorson confirmed that Madeline is trans in 2020.

YUS!

I've been after this for AGES!

Here's more incredible art that Jolters made for #GameJoltColors25!

There's still time for YOU to enter!

Artists and posts linked 🔽

Does this count as Fan Art?

Harvest Moon is a big influence, even if farming isn't the main gameplay loop.

#FanArtFriday

Dive into the cozy post-apocalyptic open world of Critter Cove!

Gentleman Rat Studios (@GR-Rob ) describe it as “a little bit Animal Crossing, a little bit Stardew Valley. Maybe even a little bit Windwaker, too."

Wishlist the game: https://bit.ly/CritterCove

bionical

#GJAsks