top | item 43726051

Defold: cross-platform game engine

391 points| xd | 10 months ago |defold.com

172 comments

order

evv|10 months ago

They have gone with an interesting licensing solution here. I really appreciate that it is labeled as a source-available license instead of Open Source.

https://defold.com/license/

You can make proprietary changes to the engine without releasing them (unlike GPL). You can freely monetize games built with the engine, and they make some assurances that there won't be a bait-and-switch.

And finally, the reason why this is not Apache 2.0- you cannot monetize (forks of) the game engine itself.

This seems fair and carefully considered. Kudos to the team!

echelon|10 months ago

This is an awesome license. More products should be source-available like this.

This is what sustainable "equitable open source" looks like. It keeps the team that built the product able to monetize, but it does so without harming or killing the community. The community has full access to the code and can modify it, make money from products made with it, and can presumably take over if the originating organization dies.

The company can choose which services to offer for free and which ones to charge a premium for. Cloud CI/builds and hosting seem like good monetization levers while leaving the engine and editor completely free of charge and open for development and modification. You can build a sustainable lifestyle business this way.

Database vendors should use licenses like this to prevent Amazon from stealing their work and bleeding their cash flow.

Redis and Elasticsearch should have done this before Amazon cloned their products, started making bank on managed versions, killed their monetization efforts, and turned their communities against them.

Matt Mullenweg should have done this instead of throwing a fit.

Tepix|10 months ago

I agree that the license looks fair. Not everything has to be OSI-compliant open source. They even support WASM!

executesorder66|10 months ago

> You can make proprietary changes to the engine without releasing them (unlike GPL).

Why is that a good thing?

>You can freely monetize games built with the engine,

You'd also be able to do the same if it had a GPL license

>and they make some assurances that there won't be a bait-and-switch.

If it was licensed under a GPL license you wouldn't need to rely on "some assurances"

poulpy123|10 months ago

I like the licence, and it is for me open source in spirit if not in letter, but there is a case that could cause problems : what if you sell services for a closed source version of defold ?

agnishom|10 months ago

[deleted]

progbits|10 months ago

Major props to them for not only calling it "source available" (and not trying to misuse "open source" like so many do), but also for highlighting the additions to their Apache-based license: https://defold.com/license/

progbits|10 months ago

IANAL but seems like the only addition is preventing you from selling a game engine based on it. So you can sell a game, but not an engine. I wonder where a game with built-in editor ranks.

Seems fair, but sadly not OSS. I wonder why they think it's necessary?

seba_dos1|10 months ago

> (and not trying to misuse "open source" like so many do)

They only stopped because of the backlash they received when they tried to. Their initial announcement was about "Defold becoming open source".

tunaoftheland|10 months ago

I've had a soft spot for defold, partly because they're unique in the gamedev space. For example, the GUI editor that is built-in is done in Clojure! https://github.com/defold/defold/tree/dev/editor (cljfx for the GUI, I am rooting for seesaw though :))

From what I understand it emerged from a gamedev studio from Sweden (King or something?) so there's commercial release pedigree there. I believe their console platform build/release tooling does cost money for game devs because the platform SDKs themselves impose restrictions. But I get the impression that defold as org does seem to put in earnest effort to be fair to game devs with licensing, etc. like others mentioned here.

mtnygard|10 months ago

It’s cool to see this mentioned. I worked on the editor back in the day. It’s actually the second IDE for Defold. The original one that we replaced was built on Eclipse.

A team of about 6 people replaced the IDE core and built a dozen tools over a year.

It was a fun project. Not many people can say they built a desktop gui with Clojure!

Cthulhu_|10 months ago

If it is King, then it's got a huge (financial) backer; King is one of the most profitable game publishers thanks to e.g. Candy Crush that made their revenue jump from $62 million in 2011 to $1.88 billion in 2013. It was bought in 2016 by Activision Blizzard, which in turn was acquired by Microsoft in 2023.

Ah, the wiki page also mentions the Defold engine, which was first developed in 2007 and acquired by King in 2013, then opened to its current licensing model in 2016.

rockyj|10 months ago

Defold has been there for a while, not sure of why this in on the front page right now. Anyways, Defold is good, the community, docs etc. are on the lower side as compared to Godot.

The other options include MonoGame https://monogame.net/ (Stardew Valley was written in it) and of-course the biggies like Unity or Unreal. A lot depends on how much investment in learning one wants to make, what is the feature set one is looking for, the trade-offs or platforms one wants to keep in mind and which programming language / style one want to use.

hokumguru|10 months ago

I cannot stress enough how much I love Monogame. Its been a joy to work with.

bentt|10 months ago

I remember when Unity first appeared and what it felt like to read its materials, its pitch. It was like... whoa, this might actually be something.

This feels similar. Sometimes you can just tell by the communications and the spirit of the language that the team has the goods.

The fact that they have such comprehensive multiplatform export right now is big. One of Godot's biggest hurdles has been console support.

My ONLY beef, from what I saw, was that it was Lua only. If it was C# I would have been more excited. But at least it's not a full C++ recompile like SOME engines. :)

tapoxi|10 months ago

Godot does support consoles, they just choose to move that to third parties. There's community Switch support if you're a registered Switch developer, and W4 Games licenses export plugins.

One of the reasons for this is because console plugins can't be developed in the open like the rest of the engine, because the console SDKs are behind NDAs. It's a pretty ridiculous holdover from when consoles were more specialized.

xandrius|10 months ago

Exactly, read Lua and got out instantly.

Games are complicated beasts, something along the lines of C# help massively the development and the avoidance of bugs.

Python, <X>Script and Lua are not languages I'd wish to switch to from the coziness of C#. I'd consider Go or Java (although not as hip as it used to be).

nunodonato|10 months ago

I'd love to see a more in-depth comparison in terms of features with Godot. Seems the latter is much more advanced, at least in 3d capabitilies.

vunderba|10 months ago

Defold isn't really intended for 3D games at all. It's got a much stronger focus on 2D mobile/web.

2mlWQbCK|10 months ago

How does it compare to Löve 2D, other than shipping with a IDE? Looks like Defold supports more platforms, but I guess there are some strings attached since packaging games for various consoles usually come with very non-open dependencies.

https://love2d.org/

Ralfp|10 months ago

I’ve used to follow this few years ago. This is a game engine created by King that they then set free after deinvesting from it themselves.

pk-protect-ai|10 months ago

Looking into the code ... Wow ... This is not C++, it is C with classes ... https://github.com/defold/defold/blob/dev/engine/dlib/src/dm... Any reasons to use these wrappers instead of modern C++ capabilities?

robterrell|10 months ago

In the game industry, "C-like C++" is the norm. Games often don't use modern C++ features like exceptions, RTTI, multiple inheritance, etc. for very good reasons.

383toast|10 months ago

Does anyone know if Defold can be used without the UI? Eg. just running it as a library or using scripting to do everything the game engine UI can do.

Purpose is just to try to get an AI to generate code with it.

ksymph|10 months ago

In theory yes, data is just stored in json and there's a CLI utility [1] for building. It's pretty awkward though.

[1] https://defold.com/manuals/bob/

vlovich123|10 months ago

Am I correctly understanding that this is a for-profit endeavor that’s relying solely on donations?

ksymph|10 months ago

It's also being funded by a number of corporate sponsors. As I understand it, a studio or publisher will fund the development of a specific feature, while general development is mostly just spare time and donations.

jsheard|10 months ago

Looks like they offer paid support, and the console branches obviously aren't public so you'd have to make a deal to access those.

landsman|10 months ago

Scripting in Lua sounds good.

jbverschoor|10 months ago

For small scripts. Lua is a huge minefield

LichenStone|10 months ago

How does this compare to something like Godot?

popcar2|10 months ago

It's less featured and has limited 3D support, but Defold is great for making smaller games aimed at the web or mobile. It has a much smaller binary size and it's generally more stable, especially in terms of physics. If you take a look at the showcase it's mostly webgames and a few smaller indies.

synergy20|10 months ago

is Teal widely used? https://github.com/teal-language/tl

Teal to lua is what typescript to javascript

hombre_fatal|10 months ago

No. But I've used it for Pico-8 development. I had to write a tool that turned it into mygame.tl into a mygame.p8 cart on save though.

japhib|10 months ago

I tried to use Teal before and had some issues even getting it to compile ... but the Lua language server actually has pretty good type checking.

Another option is https://typescripttolua.github.io/

debugnik|10 months ago

No, but Luau (which is more of a fork) from the Roblox studio is seeing growing adoption. Notably, it was used for Alan Wake 2.

Nijikokun|10 months ago

Defold is good, been around a very long time, but it's just rough around the edges, once you get used to it it's pretty smooth sailing though.

James-Bennet|10 months ago

I am looking for a game framework that allows interactive programming like LISP for browser games. So far I have tried love2d, TIC-80, and defold. Fennel (Clojure like language for Lua) works with love2d and TIC-80, but I could not get emacs repl to connect to TIC-80. Also I couldn't get Fennel to work with defold. Maybe there's a way I haven't found yet, but for now the only way to achieve interactive programming is to use love2d (love2d + fennel + emacs repl).

https://vxlabs.com./2018/05/18/interactive-programming-with-... https://technomancy.us/188

zerr|10 months ago

Related: code-oriented C++ 2D game engine - Axmol Engine. It's an actively maintained Cocos2D-x fork: https://axmol.dev

rootnod3|10 months ago

So, it mentions to support PS4/5 and Switch but doesn't mention FreeBSD? Both these platforms are FreeBSD based.

aaroninsf|10 months ago

Ask-HN:

Context:

Every time a game engine like this pops up I read through the comments noting other engines and various perspectives and criticisms (positive and negative).

I have a game-like music composition project I want to pick back up. Media-intensive with a rich isometric/2D environment, with lots of little animations, which need to be synchronized to perfectly-scheduled audio events.

I develop fully-feature prototypes in the past, most recently on iOS for iPad before there was iPadOS... but using Core libraries hit a performance wall on hardware of that era.

Question:

Who can I consult with up front to get good advice on what technology path to pursue, to realize my project?

WebGL/Webasm would be fine. Cross-platform console targets would be fine. iPadOS would be fine and best, gestures are a core part of the vision.

...and I have no idea where and how to find my way into this.

I follow some GameDev feeds and naturally what I read about is very capable application of engines/environments which are quite close to what I need, but which are (naturally) targetting game dev.

Say you wanted to sit down and make a rich visual sequencer with some DAW-like features? What's the right approach?

It's not a traditional DAW, it's much more about a rich tiled game-like UX; it's not a game, with levels, maps, and such... it's got elements of both. The audio engine needs to be DAW-level, but, synchronized to graphical elements and UX and responsive to gesture in a way that's like game-level.

Any ideas welcome. I think I have a good (layperson's) understanding of the overal architecture I need; but I don't know how my conceptual map translates into different styles of game-engine or more general media-engines.

My hunch is my "solodev" state which was a blocker before when I had no time to quit the day job and learn eg. OpenGL for iOS, is significantly ameliorated today by code assistants... iff they are familiar with <the engine/platform>

Do Claude Code etc. know Unity dev? Engines like this one? I don't know! Naive.

Haaaaalp

spacechild1|10 months ago

I'm building 2D computer game environments for musical performances and interactive installations. I ended up developing my own little engine. The current iteration is based on:

- SDL2 for input and window management

- OpenGL for rendering

- libpd for sound generation and processing

- RtAudio for audio I/O

- sol2 for Lua bindings

- Qt6 for the tile map editor

I'm not targeting the web, though.

> The audio engine needs to be DAW-level, but, synchronized to graphical elements

Are the sounds generated from game events? In that case, time synchronization between game clock and audio clock is indeed an interesting problem with multiple solutions, each with their own trade-offs.

If the game only acts as the user interface, you can treat it like in a regular DAW.

vednig|10 months ago

A game engine that's opensource and supports Linux. Love it

Narishma|10 months ago

It's not open source, it's source available.

amarant|10 months ago

In terms of maturity, how does this compare to Godot?

bk496|10 months ago

How many of these are there?

shmerl|10 months ago

How does it compare to Godot?

sylware|10 months ago

Hopefully their build scripts are sane for native elf/linux support:

* -static-libgcc (-static-libstdc++ if c++).

* glibc ABI selection, see binutils documentation, VERSION related page, the second part of this page. This must include the glibc internal symbols. It easy to check the proper ABI with tools like readelf (the VERSION name part), which will tell you everything.

* dynamic loading with fallbacks of all system interface shared libs.

That said, it is exactly the same for the other OSes, this is all about abstraction via tables of functions.

zenkey|10 months ago

After spending time with Cursor/Junie/Copilot etc., game engines are starting to feel slow and behind the curve. I’d love to see faster adoption and deeper LLM integration (as native features, not just some random third-party plugins). Whoever builds the first “Cursor for games” is going to disrupt the market.

cheschire|10 months ago

If Unity ever wanted to regain market cap, now’s the time. The solution seems obvious from my armchair.

croes|10 months ago

The market for bad games?

It’s not the brush that makes the artist.