HUD Prefab: Layout Changes
Not Feeling It
I'm not really in the mood right now to work on my game, feeling a bit drained. But I'm pushing through anyway, to accomplish at least something. I'll start by documenting what I decided yesterday while I was chatting with Gemini at the mall. The discussion centered around playability on mobile and the missing pieces. It originally began with me realizing that the player has no way to "interact" on mobile. At first, I thought maybe I'd just make the interaction indicator icon clickable, but I decided that may not be the best approach.
Instead, I've decided to add another on screen control for mobile whose visibility is linked to the virtual joystick. Outside of this, there's also the other parts of the game that currently rely on keypresses, the inventory, character menu, and pause menu. I originally intended on adding buttons for those independent of platform. Then there is the new system I want to implement, "quick actions", that will also require screen space.
As described in my previous dev log, Planning Is Work, "quick actions" are going to be things like eating, or drinking potions, or using certain things. I don't want to force my player to go into the inventory screen to just eat something, especially if they're in combat. Oh, combat! That's another thing I'll need on screen controls for! All these added controls are going to interfere with my previously laid out UI elements. Luckily, the area in which I plan on adding the rest of the on screen controls will take over what I originally had planned for a mini map. I'm still not sure if I'll even have a mini map, but I know I will need these other on screen controls.
Designing Controls
So, I started with a quick update to my HUD prefab, renamed the "MiniMap" container to "QuickActions" and filled it with a few elements. I'm really bad when it comes to UI in Godot still, so I decided to enlist Gemini's help in figuring out the right way to setup this area. It was at this point that I also remembered that I wanted to update my project settings to disable "emulate mouse from touch", which was a quick couple of clicks.
The actual design of the quick action section of the HUD ended up being pretty much what I was expecting, but it was good to have Gemini confirm I was on the right path. I added a grid container with three columns and filled it with my buttons and some placeholder control nodes to keep the layout I wanted. I messed with some settings, filled each button with a placeholder icon, and changed their action mode to "button press". Though, this setting may not matter much in the long run once I've actually added my code for the buttons.
Summing Up
I think it's important at this point to lay out my layout again though. Maybe to keep it fresher in my mind, or maybe to make it easier for me to find later when I'm making changes again. . .
First, there's the PlayerStatsContainer, this is situated in the top-left corner of the screen and contains the player's vitals.
Next up, there's the TargetingContainer, which is situated in the top-center of the screen. This isn't built out yet, but is planned to be implemented for the Space scene.
Then there's the TimeDisplayContainer in the top-right. This one gives the player feedback on the in-game day/time. I think I will also add some buttons up here to access those other systems I was talking about (the character menu, inventory, and pause menu).
Left-center is where the player's quest objectives display.
Smack dab in the dead center of the screen is my CentralMessageDisplay. This is where I can place important messages in the hopes the player won't miss them.
Interestingly, there isn't anything at the moment in the right-center. Maybe I'll put my extra buttons there (the character menu, inventory, and pause menu), in a column down the side instead of in my TimeDisplayContainer.
Then there's the NotificationArea, in the bottom left. This one might need to be modified since the virtual joystick appears here too. I haven't been able to test how the two interact yet. Once I can, I'll make a determination.
Bottom-center is my "hotbar". Although, this one also isn't built out and will probably only be used in specific scenes, with massive differences between what's contained in each scene.
And finally, in the bottom-right, is my newly updated QuickActions.
Next Time
And that's it for today. This was actually more than I originally wanted to do, which is great! Next time, I'll start working on the functionality behind some of these buttons. I need to update my inventory manager to prepare it for quick actions (at the very least add a couple of placeholder variables for the buttons to reference). I also need to set up the show/hide of my Dynamic Action Button in the same manner as my virtual joystick.
Xenodochium
The future is what you make of it!
| Status | In development |
| Author | Munchmo |
| Genre | Role Playing |
| Tags | 2D, Cozy, Godot, Indie, Life Simulation, Pixel Art, Sci-fi, Singleplayer |
| Languages | English |
More posts
- Virtual Joystick: It's Alive1 day ago
- Virtual Joystick: Wiring In2 days ago
- Planning Is Work3 days ago
- Refactor: Troubleshooting4 days ago
- User Config Refactor: Completed?5 days ago
- User Config Refactor: Continued6 days ago
- User Config Refactor: Planning7 days ago
- Virtual Joystick: Configuring8 days ago
- Virtual Joystick: Plugging In9 days ago
Leave a comment
Log in with itch.io to leave a comment.