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

OH! Different way of doing it.

11 lines of code, no randomness needed to stop them bouncing forever up and down!

This still means individual objects for the balls and bouncers, but no physics engine definitely means this is possible for minigames!

WOO!

It's nearly 6am, I gotta sleep "I don't think so" - OneShortEye and Summoning Salt urghhh

I guess everyday is a Friday when it's a #FanArtFriday! This one's my most recent art of Majora's Mask

I am behind on progress post but need sleep.

Drew new Crafting Buildings because I didn't want to fill the Crafting Bench with loads of Equipment Recipes.

Even with the new ones, I'm still probably going to have to add tabs to swap between types

Happy #WIPWednesday!

Are you working on a game?

Making some art?

Practicing a song?

Something else?

Tell us in the comments!

Ok, going by my test project it's totally possible to draw physics objects to the UI (top left corner). That doesn't solve the issue of having possibly 100's of extra object active at once though.

Meh, this is just a thought experiment.

Happy November everyone!

Super slow month since I took a few days off for my birthday, and spent a lot of time making new sprites which doesn't really require much write up.

Happy #WIPWednesday!

Are you working on a game?

Making some art?

Practicing a song?

Something else?

Tell us in the comments!

Happy Sunday everyone! I hope you're well! Family is all back so I got Sunday Lunch today!

Also, so many shiny maonkeys!

Time to get back to Progress Post!

Please take care, do your best and remember you're all awesome and unstoppable in your goals!