UI Based Game

I’m wondering if it is possible to make an entirely UI based game in defold. The idea I have in mind is some sort of Strategy/Board game where you move pawns around to different tiles and perform different actions based on where you are.
Each Pawn/Tile will have some sort of UI element that displays information about it(text, texture) so I think that making all objects in my game as UI objects rather than 2D sprites would be much easier than trying to combine the two types together, I could be wrong here I’m not sure.
What would I like to know is how to get UI objects to interact with each other, for example, when a player moves a pawn to a certain tile, how to detect which tile it is?
Also, how would that impact the performance especially on mobile devices?

Yes, it is possible to use GUI for all of the aspects of your game. Several games already have been made with Defold which do just that.

It should not necessarily hurt performance in any way - it depends on what and how you use features.

when a player moves a pawn to a certain tile, how to detect which tile it is?

You an either check cells within a virtual grid (similar to this https://www.pixcade.com/cosmos/web/ ), or have tiles be actual GUI elements which you check if they have been clicked with gui.pick_node

2 Likes

Absolutely. It’s easy to forget this and think that the GUI should only be used for user interface elements and nothing more. For certain kinds of games it makes perfect sense to create the entire game that way.

1 Like