Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi! I am building something similar for my children to play -- would you be willing to share how you implemented the turn order GUI in Godot? I really love the way you did it. 

I look forward to hearing from you!

Hey Richard, thanks for the feedback! The UI is where I probably spent most of my time so I'm glad to hear its well received haha, took a lot of work to get is 'just right'. As far as the Turn Order GUI, its kind of a lengthy explanation so I'll have to post a video to YT with more details and let you know when that happens. For now though, the general idea is this:

1. PanelContainer -> HBoxContainer -> Control -> TextureRect(s)

The Control under the HBoxContainer lets the inner TextureRects move around freely, while still letting you inherit what their size should be based on the constraints of the PanelContainer/HBoxContainer that holds it all.

2. Outline Shader on the character images

The TextureRects each have the corresponding character image, and this has a Canvas shader that outlines the texture with a color that is picked based on whether the character is an enemy or ally.

3. TurnManager (class)

This isn't GUI itself, but its the data that drives the GUI. It holds all of the character's and their turn orders in an array, where turn order is implied based on index. When the array changes, the TextureRects are updated. If there are, lets say, 8 texturerects - each rect is assigned the nth index of the array from the TurnManager and just displays that character's texture. So rather than having a TextureRect assigned to each character implicitly, its more about being assigned to a specific index in that array the TurnManager maintains and then updating the GUI state whenever that array changes.

I hope that maybe gives some idea. I hope to put out videos soon going over the project and discussing more of the ideas and topics to help other people, its just kind of hard to compile all of that information so I've been putting it off haha