GameMaker vs. Defold (Robot_Gif Dev Diary 2)

When I show off the game I’m working on to new people, one of the most common questions I get is, “How’d you build it?”. When I enthusiastically tell them it’s made in Defold, the usual reply is, “Oh cool!.. what’s that?”

As I mentioned in my first dev diary, my team invested months in another engine, GameMaker, and got as far as a playable prototype with most of the core game mechanics, graphics and sound working. But as the project grew and we added more complicated game mechanics, we started seeing more bugs and struggled to add new features. After doing some research on some other engines, we ended up switching to Defold, and have been extremely happy with the results. Here are a few of the reasons we made the switch:

Programming Language
One of the biggest selling points of Defold is the use of a ‘real’ language Lua, versus the proprietary GML language in GameMaker. My co-founder Meeka came up with the idea for our game RUMBLEFEST, and without any formal Computer Science background he gravitated towards the game engine that promised the best “no-code” experience. And GameMaker does a tremendous job of encapsulating programming flow in an approachable drag-and-drop GUI, and even promotes fundamental object-oriented principles without ever having to write a line of code.

That being said, once you get beyond simple collisions with a few reactions, it becomes increasingly difficult to follow the flow of logic in your game. For example, when our arcade wrestling game was just a single character in a ring trying to push out a single enemy, it was fairly easy to write scripts to handle those collisions. But when we started adding advanced gameplay features like a referee, hearts, weapons, ring bounces, and cutscene animations, it became extremely difficult to predict and control the flow of logic.

I’m a full-time software developer, so while I recognize that every language has its quirks, one of the most frustrating things about GML was the inability to define named functions in objects. True, you can kind of achieve this behavior through user events and external scripts, but it leads to convoluted code and confusion like, “Where is this function my object calling?” Questions like that are largely solved with Defold’s emphasis on:

Organization
There’s a never-ending debate in programming about the tradeoffs between strict versus flexible structure. Adding more structure in a system can increase the learning curve to get started, increase the time to add new features, and lead to ‘unnecessary’ boilerplate code. That said, more structure can also decrease certain types of bugs, enforce common standards, and promote transparency between different team members. To add more formality, some people have gone as far as to add custom type systems onto dynamically typed languages just to enforce more code structure (For the record, I’ll take untyped JavaScript over TypeScript any day, don’t @ me).

When it comes to Defold vs. GameMaker, the increased organizational requirements of a Defold project also increases its learning curve. For non-developers especially, this might scare off some folks who don’t know why they need a game object, an atlas, a script file, key bindings, and message event handling just to get a single sprite to jump after clicking a button. Even after using Defold for months, I still regularly get tripped up by the ID and URL system used in message passing.

But in the end, all this enforced structure helps to create a more organized and modular project that’s easier to scale. While it might see easier to have a single object in Game Maker with all related sprites, logic, and event loops baked in, it turns out that down the road when you have supplementary helper scripts, alternate sprites, or configuration data files, it’s much easier to organize units into directories and sub-directories with Defold.

Collaboration
This one’s for any technical user who has tried to get non-technical users to implement Git before. In a professional work setting, I’ve been on teams that have spent countless hours and seminars trying to get project managers and artists to understand how to use Git and GitHub, even at a seemingly basic level, and have it completely backfire and lead to missing work and corrupted files.

Defold’s “sync” feature is a game-changer when it comes to collaboration. It still uses Git under the hood, but the editor UI makes it easy to collaborate with team members who don’t know or care what branches or rebasing mean. Resolving conflicts can still be tricky, but in 99% of cases the sync “just works,” allowing coders and non-coders to stay up to date with the others’ changes.

Support
One of the most important skills for any programmer these days is the ability to search for answers when you don’t know something. With an esoteric language like GML, chances are when you Google for something like “what does error GML-XX mean”, you’re going to end up on the GameMaker forums. And anyone who has spent time fumbling through those forums knows how challenging it can be to get to exactly what you want to find.

While not as prevalent as something like JavaScript or C++, there’s still plenty of resources on sites like StackOverflow when it comes to Lua errors. And while certainly not perfect, the Defold documentation is miles ahead of the GameMaker docs.

Of course, there are times when something isn’t working quite right or you have a very specific question. In those cases, it’s nice to get direct feedback from members of the community who might have more domain knowledge than you do. One thing I’ve been very impressed by is the support from core members of the Defold engine on their forums. While the Defold community is still small, and the engine itself is relatively new, I’ve been extremely impressed by the helpfulness and responsiveness of the team.

Conclusion
I don’t want to paint GameMaker as an inferior tool to Defold. It’s great for individuals who want to focus on ease and speed of development for simple games without fumbling too much with code. And I also don’t want to claim Defold is perfect for any game designer. For seasoned game developers, or those looking to make cutting-edge 3d applications, something like Unity or Unreal might fit your needs better.

But for anyone who’s an indie or hobbyist game creator looking to build a 2d game with complicated game features, rich UI interactions and animations, and easily collaborate with other team members, I’d recommend taking a look at Defold. It’s backed by a great team, has a wonderful code editor, and performs great on mobile platforms. And did I mention it’s totally free?

Switching to Defold has been a great step in our journey in building RUMBLEFEST. I’m clearly in favor of it over GameMaker, but if you disagree, or want to point out something I’ve missed, leave a comment with your thoughts.

Love, pixels, and folding chairs,
Theron
Lead Developer, Robot_Gif Studios
RUMBLEFEST! Early access available NOW on the U.S. iOS app store

15 Likes

Thank you for taking the time to write this! It’s extremely encouraging to read insightful, honest and unbiased posts like this!

4 Likes

I have used stencyl and defold, and whilst Defold is obviously the more powerful tool, I couldn’t have got to where I am today without starting on stencyl.

I think I used a program called game maker in about 2003, but I don’t know if it was the same some.

2 Likes

I love it! Thanks for the long read. We love when people compare us with other tech/tools and share the results. It helps us become better.

2 Likes