Week 23: What’s in the Menu?

EarlyOwl
4 min readJan 15, 2022

Hey everyone! Welcome to the 23rd week of my game development! I finished quite a bit this last 2 weeks, and… I feel like dropping the project right now and starting over again… Reason: I have made a mess of a code, and it’s turning into a big pile of spaghetti. I am trying to figure out ways to deal with it. I’ll keep you posted about it…

But for now, here’s the TLDR of the progress I have made

  1. Lots of new UI. Now others can also understand what different buttons do… somewhat!
  2. Created a menu for switching between different levels and other typical actions.
  3. Added some visual flare to highlight the intractable objects the player is near.
  4. Visible changes happen when the weapons get upgraded

So let’s begin.

New UI Designs

In the last sprint, I had made quite a lot of changes. So it meant that I needed to communicate more things to the players about the game’s ability and actions and give them the proper feedback. So I have to make progress bars, coin indicators, etc. And earlier, I had created many dummy UI assets just to get the ball rolling. But I wanted to make sure that all the UI elements look similar, like they belong to the same family. So I quickly went to photoshop and created a bunch of new UI elements — buttons, progress bars, callout UI, etc. For the icons, I used Noun Project.

These are still temporary as I continue to explore the story and mythos of the world. The final UI design will change depending on that, but this is all I need for now.

Then I implemented the new UI’s in the game… and they work! 😀

A very exciting progress bar!

I wanted some UI elements to pin onto something in the world, like the player or other intractable objects. So I wrote this code to make them stay put in place when they are active.

Camera mainCamera;
GameObject objToTrack, objToPin;
Vector3 positioToPin_world, positionToPin_camera;

void Awake(){
Camera mainCamera = Camera.main;
objToTrack = player;
objToPin = UIGroup;
}

void Update(){
positioToPin_world = player.transform.position;
positionToPin_camera = mainCamera.WorldToScreenPoint(positioToPin_world);
objToPin.transform.position = positionToPin_camera;
}

A new menu

I wanted to have just enough options in the menu that players will need while doing the game’s initial testing. So that is all I created.

There’s one problem, though… Currently, I have implemented the Pause system by setting the Time Scale to zero. It works fine, but the UI animations also get paused when the game is paused. Which is a bummer because I wanted a nice little reveal animation for the UIs. I’ll further investigate this later. It’s not a priority for now.

Shader Graph is magic.

I again watched many tutorials on shader graphs, and my God, it’s mind-blowing when you get to know the possibilities with it. I actually ended up rewatching Brakey’s tutorial on shader graphs to create a flowing sphere.

And man, have I not milked it. Currently, this shader is everywhere in the game and is used to highlight and show all sorts of stuff.

This is temporary, of course. I’ll change it to more appropriate ones later on. But for now, I am pleased with this.

Upgradable weapons

I had made some 3d models to show different weapons earlier. I had even coded the Upgrade part of the system, and it worked. But there was no visual change when the upgrade happened. So I quickly put together a way to show the evolution of weapons.

It’s just enough to show that some changes happened when they were upgraded.

What’s next?

Next week is the Audio and Release sprint.

I have many audio issues to fix and add multiple sound effects for different things now that the game has a lot of new interactions.

Also, I’ll plan something for the spaghetti code situation…

That’s it for this week… See you next time.

I wish you the very best!

Originally published at https://www.theearlyowl.com on January 15, 2022.

--

--

EarlyOwl

📱 App coder, 🎮 Game creator, 📖 Storyteller - Sharing all that I learn along the way! Sincere hobbyist | Forever a Work in Progress | Learning out Loud