Jump to content
  • Advertisement

Defold vs. Godot – My Experiences

PhilDev

3044 views

This time I want to post something that is not related to a game I’m working on right now but to the engines I used making the last two games.

Game #2 (Castle Adventure) was made with Godot and Game #3 (Tapmoji) with Defold. I mentioned on Twitter that Defold was completely new to me and I was asked by the Defold engine developers themselves what my on-boarding experience was and if I could compare the ease-of-use and the feature-set with Godot.

At first I want to mention that I didn’t try every single feature in both engines. In general I don’t have much time so I focus on making 2D games as fast as possible. So I only used the features that were needed to finish these games and didn’t try everything. Maybe there are still features I don’t know very well that would be important to mention.

Godot

Setup

I used Godot in two game jams already and I think I know this engine a bit better than Defold. I really like this engine! The reason being, it was the first engine I used where it wasn’t necessary to download additional stuff or install anything. You can just open the downloaded file and start your project.

Example Projects

A second big plus was the large amount of example projects that can be chosen right from the editor. The Godot community seems to be very active and this reflects in the large number of examples.

GUI

The GUI is very clear and intuitive in my opinon. It’s divided in 4 parts: On the left there is the file system of the project and the scene hierarchy, which contains the nodes of the current scene. The inspector is on the right where you can change properties of the currently selected node. In the main area you can switch between the scripting editor and the graphical 2D or 3D scene editor. In the bottom area you can switch between the output console, the debugger, the audio editor and the animation editor.

godot_screen-1024x569.pngThe Godot editor

Scripting Language and Editor

The scripting language is GDScript, with a syntax similar to Python and some optimizations for the Godot engine. The automatic code completition in the editor is really helpful and speeds up coding really fast. Since the release of Godot 3.0 it is possible to code with C# and C++ as well.

godot_screen_code-1024x569.pngThe scripting editor in Godot

Docs

The documentation is very detailed and includes a huge amount of tutorials. Every single feature has its own tutorial. There are not only examples provided by the community, which can be chosen at the start screen of Godot, but also there is a GitHub repository which includes a huge amount of demo projects.

Features

In Godot you work with scenes. There is a powerful 2D and 3D editor where you can add and edit objects very easily. It is possible to choose from a large amount of pre-defined nodes for sprites, colliders, tilemaps, lights, sounds, particles, animations, networking and many many more.

A nice, big feature is the built-in editor for key-frame animations. It is possible to change every single property of a node over time. Setting up keyframe animations was very intuitive and fast for me. It saves one from writing a lot of code.

Godot has a lot of features which make developing 2D games very easy. My favourites are, as already mentioned, the key-frame animation editor, and furthermore, the TileMap editor and the simple approach to create frame-based 2D animations.

Desktop, Web and Mobile export

The desktop build aswell as the web build are very simply done with just a few clicks. When I was making “Castle Adventure” I used Godot 3.0. I couldn’t release a web build because it ran very slow. The problem was the number of lightsources and particles that are being rendered at once. I didn’t test it with Godot 3.1 yet, but maybe the web builds are more performant now.

Issues

Besides this Html5 perfomance issue there was also a problem setting up particles while making “Castle Adventure”. It was not possible to let particles emit in a particular direction. I found this Github issue related to this problem. Fortunately this was fixed in Godot 3.1!

I used Godot twice in game jams already and had to forcibly work with Git. Honestly at both jams the whole team was not amused about the time we wasted solving merge conflicts. The problem occured everytime when two or more people where working at the same scene and pushed their changes to the repository. The quickest solution for this problem was making as many scenes as possible and splitting the work, so everyone was working at their own scene.

In my opinion there should be an easier way to call nodes of a hierarchy by code. For example in Unity one can just call GameObject.Find(“Name”) whereas in Godot you often have to call every single node in the hiearchy until you reach the node you want (get_root(). get_node(“..”). get_node(“..”). get_child() …), especially when you try to call a node from another scene. This slows down coding, since I have to look up how to reach a particular node nearly everytime. Something similar to GameObject.Find() in Godot would be very nice!

Edit: Thanks to some feedback I have learned that Godot has such feature already (Node.find_node(...))! Thank you!

Defold

Setup

Like in Godot, there is no setup for installation. You just start the application and choose your project or an example project. It’s quite similar to Godot, only there are less sample projects. But what Defold does better: The sample projects are explained like tutorials. And this was really hepful to me. Less googling, yeah!

Example Projects

There are not only sample projects included in the editor, but also examples in the docs, and there is a GitHub repository with demo projects.

GUI

The GUI is a bit simpler than in Godot, since there are less built-in features. But the main part is the same: You have your project hierarchy on the left, in the central area you can switch betwen a graphical UI editor and the scripting editor. On the right you create your gameobjects and define their properties. The design is very simple. There are no additional windows for adding components or defining project properties for example. Everything works with right-click and choosing out of a context menu.

defold_editor-1024x684.pngThe Defold editor

Scripting and Editor

The scripting language here is Lua. The Editor is very simple. The automatic code completition is not as powerful as in Godot. For example it would be nice to have auto-completition when typing URLs to gameobjects, which I have to lookup everytime I need one. Also I miss popular shortcuts like Ctrl+X for deleting a whole line of code or Ctrl+C + Ctrl+V (with nothing selected) for duplicating a line. But there is an option to open files in an external editor. So it is possible to open the .script files in an editor like Sublime Text or something similar.

defold_screen_code-1024x643.pngDefold scripting editor

Docs

On the Website you can find Manuals, where every component is explained with an example and a couple of nice graphics. There is also a section Tutorials, which contains 9 games with source code. You can test them directly in the browser. You can choose them also as example projects when you start the Defold engine. The third big help on the Website is the section with Examples which shows some examples of main components like Animations, Particles, GUI, Debugging and Input. Everything is explained very lovely and detailed, espacially in the Manuals. But the examples are focused mainly at developing 2D games. For working with 3D environments there is provided little information.

Features

In Defold you have collections, which are quite similar to scenes in Godot. Collections can contain Gameobjects or other collections. Gameobjects contain components which define its visual, audible and logic representation. To access objects or components in this tree structure, you have to write the path like an url. This makes it easy to access every component out of every scriptfile.

To define properties of the application you have to change values in one single file. The game.project file. Very clear and compact approach.

There is also a curve editor for animations. I never used it so far, but I think it’s really helpful when making particle effects.

My absolute favourite feature is the possibility to build and hot-reaload on mobile devices. On Android you just have to install an app called dmengine. It was really helpful making “Tapmoji” for Android and has accelerated the development of this game very much.

Finally, like in Godot, there is also a useful debugger.

Desktop, Web and mobile export

And again like in Godot, all exports are possible with just a bunch of clicks. To install the exported apk on an Android device you have to install the adb tools.

Issues

In general there are less build-in features then in the Godot engine. It feels kind of more low-level. This was noticable when I wanted to handle input clicking on an gameobject for example. Converting screenspace to worldspace coordinates is a thing you have to do on your own in Defold. Rotating gameobjects doesn’t work as I expected and experienced in other engines as well. There is no such function like rotateBy(degrees). Having helper functions for these things would make prototyping and coding faster.

Fortunatly some helper exist! But not in the editor, you have to download them. There is something called Asset-Portal. There are some examples that can be simply imported as libraries into existing projects. There is also something really powerful for the input issue I mentioned above: Defold-Input.

I had two problems making “Tapmoji”, that took me a lot of time: The first one was related to random numbers. Even though I initialized the random number generator with system time, I experienced strange behaviour. I spawned emojis moving from left or right randomly. But the first few seconds after starting the app, they all spawned at the same direction. The first few values seemed to be the same, not random. I found this post, which helped me with a really strange solution: calling random() multiple times before using random numbers. I think this shouldn’t be necessary 😉

The second problem was the web build: It was very slow in comparison to the desktop build. The solution here was to uncheck the V-Sync option in the game.project file. Having this option checked, there is a delta-time issue when running the build in browsers. Maybe there should be a short hint in the docs?

The last and least important issue is related to the usability. Like mentioned above, I would like to use the scripting editor like every other editor, with the proven standard shortcuts. It simply makes me code faster.

My Conclusion

A big plus with both engines was the large amount of example projects that can be chosen right from the editor, they can help you find your way into the engine. Godot has more examples but Defold has some projects that are structured like tutorials, which is a lot more helpful in getting to know the engine.

I like Python/GDScript more than Lua. Lua is not that popular, so I had to learn Lua before working with Defold. For me, it’s not as much fun as Python (why the hell do they start counting at 1??). But of course this is my subjective opinion, not an engine issue.

Now let’s get to the feature set. Godot has more build-in features than Defold. It is advantageous to create 2D games fast. But having less built-in features doesn’t make Defold a bad engine. Under the hood, Defold is a 3D engine. It keeps things more low level, since this results in a wider range of possibilities for devs. However, the Godot engine started as a tool for developing 2D games, therefore it evolved as an engine which tries to make 2D game development as simple as possible. This results in more 2D features.

With both Godot and Defold, developing the very first game worked faster than I expected. You get a lot of help and useful docs and examples on both sides.

But there is still a big difference: Godot is open-source and Defold is not! I’m a big fan of the open-source approach and that’s a big plus for the Godot engine. I’m sure the Defold devs have their reasons for not going open-source (maybe beacause of the collaboration with King) but as you can see at the Godot project, this open source thing works just fine!

Both engines are constantly being worked on and both communities are very active and growing. The devs of both engines reacted to my twitter posts, that shows me that they take care of their communities! 😉 Especially the Defold devs were willing to help me and wanted my feedback on their engine.

That’s all! That were my impressions after using both engines for only a short amount of time. There are far more things to compare to each other, but as mentioned before, I don’t have that much experience with either engine. I hope that this comparison was informative for some of you and may help someone choose a new engine.

I’m looking forward to the development of the engines in the next few years!

 

View the full article

 



1 Comment


Recommended Comments

Defold looks fun but definitely the open source nature of Godot was a big selling point for me. There will always be bugs (I'm not going to lie lol :D ), but the fact you can fix them yourself / help get them fixed is a huge bonus.

The devs are very friendly on github and sometimes if you find an issue and report it on github you can have it fixed very quickly (or a workaround), plus have influence over how the engine develops to have features you want. I had been using it for 6 months for the challenges here on gamedev and am now happily contributing to the main engine.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By RoKabium Games
      For this Screenshot Saturday we captured an image during one of the Earthquake events that occurs on Tartarus. During this time the underground turns into a fire inferno with Monodons spawning in big numbers so be prepared to defend yourself.
    • By Zeath Sanford
      Project Name: Rise of the Betrayer
      Program/Language: Game Maker Studio 2 using GML
      Current status: All Tilework is done, Demo is near completion with Enemys, Bosses, Weather, Day/Night
      Website and video devlogs: Blastedrealm.com 
      Roles Required: [Programmer, Pixel Artist, Social Media Manager,] 
      Programmers
      This position is looking for a GameMaker Language developer in GMS2. We are looking for people who know how to compose and create logical modular polished scripts and can generally work with others please apply using the link below.
      Pixel Artist
      We currently have the majority of the Parallax and Tilework all ready. Will need to help with some other miscellaneous needs for the game such as UI, Bosses, Puzzles or more
      All artwork is 32x32 based.
      Social Media Manager
      For this position we are looking for someone who knows how to advertise a game. Posts would be to our Website and Social Media platforms. Knowledge or some experience of the position would be helpful but not required.
      Recruiting New Members Form
      https://docs.google.com/forms/d/1ArnSD8poXTu9wmjacM8ItfDDKM960uOfN-iyCnsVMsc/viewform?edit_requested=true
      Genres: MetroidVania/Puzzle/2D Platformer
      Description:
      Rise of the Betray is an Action-Adventure game.
      The game will feature decision-making, crafting, fast-paced combat, multiple endings, intricate story-telling, an open world to explore, and more!
      Rise of the Betrayer will pose a dark atmosphere at times, filled with drama, mystery, and dread. 
      The game will feature hard-core level of difficulty when it comes to platforming, combat, puzzles, and decision-making.Crafting is a big part of the game, so we encourage players to use the tools they have and come up with unique ways to overcome a challenge.
    • By RoKabium Games
      We've just released a new Alpha version (0.805) of our game SAMA. Lots of changes in this version, mainly around simplifying the UI and game play. Making the pirate list easier to understand, and adding more upgrades, much much more. If you would like to help out with testing, follow the link below.
      http://www.somethingatemyalien.com/forums/Thread-Sign-up-for-Alpha-Testing
    • By hoahong
      Hi guys,
      I get the code from StackOverflow to convert RGB (camera image) to RGBA
      public static unsafe void RGB2RGBA_FastConvert4(int pixelCount, byte[] rgbData, byte[] rgbaData) { if ((pixelCount & 3) != 0) throw new ArgumentException(); fixed (byte* rgbP = &rgbData[0], rgbaP = &rgbaData[0]) { FastConvert4Loop(pixelCount, rgbP, rgbaP); } } static unsafe void FastConvert4Loop(long pixelCount, byte* rgbP, byte* rgbaP) { for (long i = 0, offsetRgb = 0; i < pixelCount; i += 4, offsetRgb += 12) { uint c1 = *(uint*)(rgbP + offsetRgb); uint c2 = *(uint*)(rgbP + offsetRgb + 3); uint c3 = *(uint*)(rgbP + offsetRgb + 6); uint c4 = *(uint*)(rgbP + offsetRgb + 9); ((uint*)rgbaP)[i] = c1 | 0xff000000; ((uint*)rgbaP)[i + 1] = c2 | 0xff000000; ((uint*)rgbaP)[i + 2] = c3 | 0xff000000; ((uint*)rgbaP)[i + 3] = c4 | 0xff000000; } } And Convert RGB to RGBA like this:
      byte[] rgb = new byte[800*600*3]; byte[] rgba = new byte[800*600*4]; RGB2RGBA_FastConvert4(800 * 600, rgb, rgba); But i need to convert RGB TO ARGB too, so anybody can please help me?
      Thanks
    • By lacky
      Hey everyone !!
      My name is Florian, and I'm a solo indie game developer, programmer, and digital artist. I've been working passionately on my very own game for quite some time now, and today marks the day of its announcement via Kickstarter! 
      The game is going to be a a challenging 2D platformer in a lovingly created pixel art world! Experience a packed story full of adventure, dangers and secrets! Exploring this vast world with all its mysteries, as well as challenging platforming gameplay and tough boss battles are the main focus points of the game.
       
      You can find tons of information on the game, as well as the game's trailer over at the Kickstarter project page!
       



  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!