Is Defold a good choice for an economic strategy game with idle/incremental mechanics?

The Defold gui system is indeed based on low level building blocks, but that is intentional. We do not wish to decide for the developer how a button, checkbox or scroll list should be implemented. These things are more high level than what we target with the GUI system and we believe it is better if we let the developers decide those things.

Here are two libraries with support for buttons, checkboxes, scrolling lists etc:

Druid GUI library: Druid
Gooey GUI library: Gooey

And a great looking and UI heavy game: Zooconomy (Strategy-puzzle) - #59 by russelkgd

Game objects are the basic building blocks of a Defold game. They have a unique id and a transform (position, rotation and scale) in 3D. You build behavior and complexity through components which you attach to your game objects when you design them in the editor. There are many different components: sprite, particle fx, model, physics sound, script etc (check the manuals for a full list)

The messaging system is an integral part of Defold. The physics engine sends collision messages to your physics components and you can use your script component to react to the messages. You can get a message (or callback if you prefer) when a sound component has finished playing a sound or when the flipbook animation of a sprite has finished.

You can also send your own game specific messages between game objects from your scripts. Examples:

  • The player script sends a “game_over” message to a game controller script when the player health reaches 0
  • The player script sends a “coin collected” message to the in-game UI script to increase the coin counter

You attach scripts to game objects to build your logic. You can also reuse logic in Lua modules which you can require from multiple scripts.

Yes, Lua has a single data structure, the table. And it is great. Here’s an array:

local list = { "tables", "are", "great" }
print(#list) -- 3
print(list[2]) -- are (yes, tables are 1-indexed!

And here’s a map/dictionary:

local enemies = {
    orc = { hp = 5, damage = 4},
    goblin  = { hp = 3, damage = 2},
}
print(enemies.orc.hp) -- 5

We have some interviews with Defold developers on our blog (search for Creator Spotlight):

5 Likes