For what is Defold good?

Open discussion

I want to ask a general question and see your answers and some opinions about for what is Defold useful and for what it will not be good.

Many people were asking me, why I have chosen Defold, so I thought that I could prepare a short video explaining its strengths and weaknesses, but I don’t want it to be only my opinion - so I’m asking for help to make it more insightful. It might be a boring question, but I’m curious about your opinions especially now, after the announcement about the source code :wink: And it might be really useful for newcomers wanting to know this!

16 Likes

Defold is great for most 2D games, I would even say that I think Defold is currently the best engine on the market for ‘turn-based’ 2D games, games that can utilize the message passing system to 100%.

Defold can be incredibly fast to prototype, because of the underlying technologies such as the message passing and it being in LUA which is (at least for me) comparably fast to write in, especially in combination with a lot of peoples add-ins out there. I find it a lot faster to set up a gui or a collection than it was to setup a corresponding prefab in Unity.

The resulting executable from Defold is, from what I have seen, tiny compared to other engines which is a huge selling point for Mobile and a requirement for instant games.

Another thing Defold is great at is that there is not a lot of setup needed to start creating, you download the editor and you can already build for all supported platforms. At the company I work for one of the features in the game our team did got a lot of eyes on it from all over the company, which lead to that a few people contacted me asking how to set up the tech-stack (they where using a different engine for their teams projects), when I told them they only had to 1. Download Defold and the repo 2. Open the project and 3. Build it they thought I was joking.

The community surrounding Defold is simply awesome, there are so many helpful people and you often get help from the Developers of Defold directly.

Defold is not great when it comes to 3D, a few 3D objects would be fine but as soon you start wanting to have rigs and skinning the workflow and “out-of-the-box” features for shaders and lightning becomes lack luster.

Defold’s GUI system is flexible but bare-bone. Sure you can build it however you want (which is kind of what you want with games) but it would be incredibly difficult and time consuming to create a GUI heavy app that feels native to the OS with Defold.

Defold is still not that widespread so if you are a “copy-paste-coder” then you will find a lot less ready made code on Stack Overflow and similar site. (Which is actually why I in the beginning kept to Defold, oh so many years ago, instead of switching back to Unity as I felt I was always taking the easy way out and google a problem instead of figuring it out myself.)

Defold’s Editor is also not the best on the market, there are quite a few features missing that you would expect. You can live without them and kind of forget that you want/need them after a while, but having them there would be nice.

In the end I am an advocate for “Using the right tool for the Job”. If you are trying to build a GUI heavy app and not a game then use Flutter or React Native, if you want to do a beautiful 3D game then Unity or UE is probably the way to go. But if you want to make small 2D games fast then I do think Defold is currently the way to go.

TLDR;
Pros:

  • It’s fast to work with
  • LUA
  • Small executable
  • Tech-stack is “the editor”
  • Great community

Cons:

  • 3D support is to lackluster
  • GUI will never feel native to OS
  • Not “main-steam” (yet… :wink:)
  • Editor isn’t as “Triple A” as Unity and Unreal.
17 Likes

I tend to make my comparisons with the Unity engine as that seems to be the default one people use. Don’t know which engine to use? Get Unity. Which, as we know, is often not the best choice.

Some good points about Defold (from my experiences)

  • Get started inside of 5 minutes. Downloading and installing the editor is very fast. In fact, it doesn’t even need to ‘install’ as such. Just copy the files from the ZIP to your computer.
  • Updating to the latest version is also very straight forward. Click the “Update Available” link, wait for download and restart. You can be confident your game will still work after updating (unlike Unity)
  • Fast build and bundle times. No waiting around to test your latest bug fix or try a particular platform.
  • Native extensions are available to add functionality outside the scope of Defold.
  • As already mentioned, the community for Defold is really great. Personally, I feel this is because of the relatively small and dedicated user-base. If Defold becomes very popular, this dynamic will likely change for the worse.
  • Defold allows hot-reloading of assets. The dev can change particular files and re-inject them into an already running build. No need to restart the game.
  • Defold builds are high-performance. Web builds are particularly good and very stable when running on different browsers.
  • Builds have a very small size overhead. Most of my games, when zipped up are 3-4MB. This is truly remarkable. A Unity build might be 5 times this size.

And some things I would like to see improved:

  • The code editor is not the best. The auto-complete and auto-tabbing aspects of it, I find particularly janky and they cannot be turned off.
  • None of the editor can really be customised as such. We devs like having that sort of thing at our disposal.
  • The default render script is quite limited. It would be nice to have more ‘out of the box’ options (such as those provided in RenderCam). I’ve found RC to be buggy though so don’t use it.
13 Likes

I tend to agree with everything said already.

PROS:

  • very easy to get up and running
  • low friction of native extensions
  • hot-reload
  • build size and targets performance
  • community
  • debugger for lua!!!

CONS:

  • editor still not as complete as it could be.
  • extensions for the editor still very basicGive the community a solid foundation to expand and customize the workflow.
7 Likes

Mmm, this thread definitely reminded me of some things that I took for granted now, but have influenced my choices a lot.

PROS:

  • Great performance for 2D rendering and for scripts.
  • Reliable - very few bugs compared to Unity/Godot/UE4, incremental releases.
  • Actually cross-platform (all 6). Small, fast, web builds.
  • Build for any platform in a few clicks with no extra setup.
  • It has an editor (though it’s not great), so it’s faster to develop with than “game frameworks”.
  • ~400 MB download, and that’s all you need. Not 2+ GB, not 10+ GB!
  • Great documentation.
  • Great community: friendly, professional, and with constant staff support.
  • Simple API, you don’t have to wade through layers of stuff to find what you want.
  • Native Extensions allow many extra features to be added.
  • Simple 3D is possible.

MEH…

  • Fewer built-in features.
    • CON: Slower to get started, can’t just drag-and-drop in tons of pre-made stuff.
    • PRO: Built-in features are usually broken or don’t work the way you want, so who cares!
    • PRO: Don’t have to strip out tons of junk to reduce build size or improve performance.

CONS:

  • Very limited physics.
  • Poor desktop support.
  • Bad at dynamically loading or generating content at runtime.
    • This doesn’t affect the most common types of procedural generation though.
  • A unique handful of annoying quirks like every game engine has.
5 Likes
  • Collaboration, its tools make working with others faster and easier.
  • Refactoring, it was a fundamental design philosophy and still is, making changes is fast and easy. The refactoring tools are also collaborative tools because it enables designers to work on a project directly, and for coders to refactor their changes without wasting time, all of the busy work is handled for you by the tool.
  • Small, stable engine. It really is exceptional how good the engine is. Seeing a tiny memory footprint is awesome! Having crashes being extremely rare and always fixed quickly is awesome!
  • Hot code reloading. Even shaders work with this. It has been invaluable for mobile dev.
  • The ability to deploy new builds over wifi directly to a copy of the engine is pure magic.
  • Texture profiles really remove the pain of delivering source quality PC builds and compressed mobile builds. We used to have to generate 2 sets of texture atlases one for PC one for mobile, and regenerate them whenever we made changes to files, now with Defold we don’t have to, it’s setup once and it works forever.
  • Live update features are another pure magic feature. The ability to ship a 1MB APK is incredibly valuable when download size determines if they will even ever open your game. Live update also means the ability to live patch your game without relying on the app stores to update your game, you can fix critical issues live if you set it up!

There’s more of course. Others in the thread give great points!

10 Likes

What do you mean by this?

Even PBR is possible but currently it is tedious to setup and work with. I’m hopeful of this improving!

3 Likes

So true.

This is without doubt the biggest drawback for me. Would be great to have reliable 2D physics, like a newer version of Box2D, or even Liquidfun.

5 Likes

This is on the roadmap for this year

4 Likes

Also for 2d physics worth noting:

6 Likes

5 posts were split to a new topic: Access to Defold across the globe?

I agree almost everything + it is open source(a kind of) now!

I love Defold because it is almost bare bone. I like to do things DIY style. I was planning to deep dive to SDL/GLFW or Monogame before Defold. Honestly, spending time for sprite batching, handling fonts or atlases and generating complex scenes quite a waste of time for me(Yes I’m lazy).
Defold Editor saves a lots of time for handling fonts, generating atlases, adding game objects… It is so easy to design complex scenes and GUIs. Defold’s design is really good.

I think, built in code and tilemap editor is a waste of time. They should be removed from the IDE(yes seriously).
If you want to write a code, go use vscode, sublime, atom or whatever you like. Developing build-in code editor is a waste of time for our precious(my precious!) main engine/IDE developers/designers. Because they are never going to be good as their competitors.

For tilemaps, same thing can be achieved by adding programmatically generating tilemap. Then we can add (proper)support for Tiled. I know it is not easy, but I believe it will give Defold a huge boost(since pixel art games on the rise). It is something like moving Spine support to native extensions but much more important.

Shaders, sprite shader. Multi-shader(ex: for normal maps) support and local coordinates are required when using spritesheets.

I know Defold’s main focus was mobile platforms because of the King! Which is why it is perfect for mobile platforms. But I believe there is a huge opportunities at desktop game development side for Defold and there is a big rooms for it.

Most important thing is; main engine/IDE devs/designers are accessible(and they are calm and helpful). This is priceless for me.

Why not Unity? Because Unity is mostly hype. It is a great engine for sure . But when there is Unreal, it is waste of time :stuck_out_tongue: I worked on a few serious/commercial Unity projects. Main issue was the updates. I can’t tell you all the details right now but it is a pain in the ass. And it became too complex for small teams. Even on scripting side. If you think you can build a proper game by using gameobject.find then I will laugh :smiley: It has great 2D features which I’ll be glad if Defold have them. But who cares :slight_smile: You can create a new Mario Brothers with Defold. (Who needs AR or VR anyway! These are just PR)

– Sorry for writing and grammar mistakes, English is not something I’m good at –

P.S. I love Defold because of its 2D focus. I’m not interested in 3D. Go use Unity if you want to develop 3D game :stuck_out_tongue:

16 Likes

I agree with this 100%!

My first few years of game development used LibGDX, which is a similar level of abstraction to Monogame. There were external tools to deal with fonts and atlases, but having them integrated in Defold is such a time saver. Being able to visually edit GUI scenes has been great as well, compared to hand-coding things in Scene2D (I think visual editors are probably available, but I never tried).

The performance of Defold out of the box is extremely impressive as well.

6 Likes

I tend to agree with this personally. I’m not aware of the upside to the built-in code editor though so I am probably missing that side of the argument. Tailored code completion? I’m sure there are more and stronger benefits than that.

Anyway, I just know that since day one I wanted to use an external code editor, if for no other reason than to have more screen space in a dedicated window.

:+1: :stuck_out_tongue:

4 Likes

Did you find the time to make the video? I think it would be interesting to watch it :slight_smile:

2 Likes

Yes, I did, and about half of it is made, yet till then I didn’t find more time to complete it :sweat_smile:

2 Likes

Question for those who master several game engine: How does the UI system of Defold compare to other (let’s say Unity).

Asking this because I’ve been interesting in build apps at the intersections of games and “consumer” apps (think something like Uber). I’m wondering if Defold could a good choice for this.

Apart from that, and to answer OP:

  • Defold is a joy to work with for 2D games.
  • The team and the community are top-notch.
5 Likes

This is quite interesting and something I believe could work quite well for some apps at least.

User interface
One problem I see is that, at least on mobile, there is this expectation that apps should look and feel very native. This may not be true for all apps on all platforms but I think it could pose a problem.

Some thoughts on different UI alternatives:

  • Gooey, Dirty Larry and Druid - UI libraries based on Lua GUI nodes.
    • Pro: You can use the GUI scene editor to design your UI.
    • Con: Druid and to some extent Gooey has the basic components needed, but if you need anything else you need to build it yourself.
  • Dear ImGUI - I think @dlannan shared some screenshots of an app using the Dear ImGUI extension. You can create some pretty complex UIs with only a few lines of code.
    • Pro: There are a lot of components.
    • Pro: Battle tested, stable and fast!
    • Con: Not all components in Dear Im GUI has Lua bindings yet. Easy to add though!
    • Con: UI layout created in code only
  • WebView - Create your app using HTML, JS and CSS and load it in the WebView extension.
    • Pro: Lot’s of resources online
    • Con: I believe there are some restrictions on what kind of JS code and APIs are available in a WebView
    • Con: Running a webpage to create an application inside an application seems clunky
  • Roll your own - I think it would be possible to create a native extension that would allow you to programatically create native UI components
5 Likes

My 3 dimes:

I’ll steer clear of talking pros and cons there are many described above.
I also wont compare engines because comparing engines to engines is pretty silly anyway. I mean think about it, two different products made by two different groups of people… they will be different :slight_smile: … so I will talk about features and use cases. For me, this is the most important part for architecture. You need to answer:

  1. Can I build what the customer wants with this toolkit.
  2. Can I make it profitable to build solutions as a business or easy enough to do as a hobbyist.
  3. What are the resource and monetary costs involved in using a toolkit - business (applies to 2) and hobbyist (applies to how much I can spend without annoying my wife).

Using criteria like this I think it may help explain what Defold is good for (remember though, this will be different for different people and different use cases).

Can I build what the customer wants.
Using Lua and Luajit, I can most assuredly say yes. There is no limit here. You will need to learn the magic that holds Defold together, but with even a small amount of time learning you will be able to achieve quite impressive results. And most importantly, there is always a way forward, whether it is with lua script, Defold objects, Defold SDK, native-extensions, ffi, Java or C…

Can I make it profitable to build solutions as a business or easy enough to do as a hobbyist.
Its hard to estimate this without an explicit use case, but after around 2-3 months of solid investigation I would have to also say yes. I am positive the overall benefit in comparison to some other toolkits (I have used to build the same applications or gfx samples) I have found Defold to have an efficiency of around 2-3x in terms of implementation time for a feature. Sometimes much higher (Lua script integration from external sources)… sometimes a little lower (3D features mostly).

If you need to produce a specific outcome the limitations will be mainly in the production of GUIs and 3D scenes and management of them. This will change. Imho. Making my own tools, it is clear to me that it is easy to fill these gaps with your own solutions very quickly and easily thanks to the native extensions and the ffi/C systems for luajit.

What are the resource and monetary costs involved in using the Defold toolkit
Monetary costs: Very very small. Almost non-existent. I think, honestly, I would happily pay money for an engine that is as cross platform friendly as Defold. There is NO comparison in this space. Ive used alot of engines and toolkits, and to be able to build a Win app from Linux, then jump to a Win Box and build a Android App… its kinda dream like. Really amazing.

Resource costs are an interesting thing to talk about. When I refer to resource costs, I refer to costs like how to get a person to be able to work with Defold, what level of skill is needed, what amount of training will be required, and whats their effective “time to becoming productive”.

Defold is again, quite impressive in this space, but there is a caveat here. I find many “serious” C++/Java programmers do not consider Lua or Luajit to be a professional tool for developing software with - which is kinda funny, because in the network high perf industry I work in, it is the defacto norm almost. But in industries like Defense, Education and Commercial applications Lua and Luajit are not often even considered. This then impacts the range of skills you can bring to your project. You might find difficulty bringing in experienced coders needed for some of the more complex tasking. We have found this ourselves with Luajit on its own, and I think Defold may suffer a similar issue. However, because the Games industry readily accepts Lua/Luajit there is a large talent pool available to leverage from.

Overall, Defold has shown to be excellent for 2D games, as well as applications (mobile, desktop and web) and it has even performed well with my 3D implementations of shaders, meshloaders, scene management and simulation tests. I consider Defold a highly valuable tool, and I think Defold will be going places… Im certainly going to attempt to take it to some interesting clients :slight_smile:

20 Likes