11 ms·
Defold: cross-platform game engine
- sylware 1y agoHopefully 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.
- landsman 1y agoScripting in Lua sounds good.
- jbverschoor 1y agoFor small scripts. Lua is a huge minefield
- noodletheworld 1y agoThat seems kind of unfair. There are things that aren't great about lua, and I'm not going to pretend they're not. buuuut... - It's really perfectly ok if you use competently. - There are large complex systems and games built using it (eg. factorio) that show that scaling it is both pragmatic and possible. - It has a big active community. When you compare it some other scripting solutions (boo, unityscript) that were just incompetently done, or mystifyingly deciding that writing your own language is the solution (jai, gdscript), I feel you have to admit it's a reasonably pragmatic choice. There aren't a lot of other languages that embed as a scripting layer the same way that lua does, with the same performance. Many candidates are either very hard to work with embedded (python) or simply lack any feasible way to possible embed them as a runtime scripting layer (go, zig, c, etc). Maybe there's a future for WASM scripting layers in games, but for now, I certainly haven't seen it done well. I can confidently say: Lua, the language, is not a minefield. Not to me. Not to you. Not to anyone. Some projects expose a lua scripting API that is a minefield; ...but those two things are not the same thing, and by all accounts (I haven't used it personally, but just idly reading the forums) the defold scripting layer seems fine to most people.
- mst 1y agoI remember some years ago we got somebody joining irc.perl.org #perl to ask for help replacing perl with lua as a game scripting system. Obviously, a few people were like "uh, why would -we- want to help you with that?" As soon as I saw an example of this existing code, however, I told said people to STFU ... because for some arsef_cked reason I don't understand at all, they'd used EmbPerl of all things for the scripting, which is basically "PHP for mod_perl" and exactly as horrible as you might imagine even when used for its actual purpose rather than in this case for something completely unrelated. Even if sensible perl would've been an acceptable approach (and speaking as a veteran perl programmer, I would still consider lua to be more suitable; I strongly consider an importand part of the Zen of Perl to be knowing when to use something else) the approach they had taken was an abomination unto Nuggan and very much deserved to die. What they had was very definitely the sort of perl code that justifiably contributes to people hating perl, and I considered it a service to perl to help them rip it out in favour of lua code that actually made sense. (I, personally, think perl works very well as a scripting layer for e.g. irssi, though you might come away disagreeing if you read the average irssi script rather than ones written with a little care and concern ... but for a game? Nah, lua all the frigging way)
- deleted 1y ago[deleted]
- chickensong 1y agoFWIW, Factorio is primarily C++, with Lua for mods and map editor.
- noodletheworld 1y ago… space age is a mod. Obviously any engine will have a lua scripting api written in c++ but if youre somehow casting shade about factorio being a lua success story, youre barking up the wrong tree.
- jbverschoor 1y ago> - It's really perfectly ok if you use competently. That's the case with assembler too. It's exactly my point. I love how lua works, is easy to embed, fast, and can compile to bytecode. But I really miss "compile time" checks, but my biggest issues are: - You have to kind of invent your own modules / class-system. It's a lot of boilerplate and error prone - The 1-based indexing is horrible - Looping over 'arrays' would require sorting the keys first. i.e. there are no arrays. It's been little over 10 years since I've done lua (gaming). Oh, and I used lua in an nginx handler after that
- britzl 1y agohttps://blog.luden.io/what-do-i-think-about-lua-after-shipping-a-project-with-60-000-lines-of-code-bf72a1328733 https://blog.luden.io/what-do-i-think-about-lua-after-shippi...
- zenkey 1y agoAfter 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 1y agoIf Unity ever wanted to regain market cap, now’s the time. The solution seems obvious from my armchair.
- blensor 1y agoI am rooting for Godot here because it has a human readable scene file format. So when you have an AI agent modifying your project you can actually understand what it did, vs. the unity yaml based format that is mostly unreadable.
- KronisLV 1y agoThe JetBrains Rider IDE also works pretty well with Unity. Wonder if their Junie tool will support C# soon, the current features for other languages are already cool: https://www.jetbrains.com/junie/ https://www.jetbrains.com/junie/ (I got access to it cause I have the all products pack, pretty good so far)
- LarsDu88 1y agoThe problem with Unity is not their marketshare of game developers (which they have in spades), but rather their market share of ads which they completely missed out on. Game developers don't bring nearly as much revenue as ad serving, which is a sad commentary on the reality of software development and the state of of the games industry.
- floydnoel 1y agoof course that exists, it was posted on this site even! i wouldn't be surprised if there are several by now. check out Rosebud.ai https://news.ycombinator.com/item?id=38868185 https://news.ycombinator.com/item?id=38868185
- evv 1y agoThey 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/ 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!
- selfselfgo 1y ago[dead]
- Tepix 1y agoI agree that the license looks fair. Not everything has to be OSI-compliant open source. They even support WASM!
- echelon 1y agoThis 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.
- Shorel 1y ago
- progbits 1y agoMajor 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/ https://defold.com/license/
- progbits 1y agoIANAL 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?
- auggierose 1y agoBecause they don't want somebody else to sell their game engine? It's pretty clear, isn't it?
- rowls66 1y agoWhy would anyone buy their game engine when it is available for free? Seems like a solution for a problem that doesn't/won't exist.
- Wowfunhappy 1y agoThis was my question to. I suspect they're worried about someone making a paid version with extra features which aren't contributed back to the community. For a moment, I was thinking Defold ought to dual-license their engine under both the current non-OSS modified Apache and the GPL. That way, you'd have the option to either: 1. Commercialise software created using modified versions of Defold, without releasing the source of your modified version, as long as you don't commercialize your modified version of Defold itself. 2. Commercialise a modified version of Defold, but you must make the source available under the GPL. (Which would mean that source could be used by the upstream project as well.) But while typing this up, I noticed the flaw in this plan—the parenthetical isn't true! Because the upstream project would be dual licensed, they couldn't use GPL licensed code.
- nunodonato 1y agoI'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 1y agoDefold isn't really intended for 3D games at all. It's got a much stronger focus on 2D mobile/web.
- britzl 1y agoNot entirely true, but sure, there are fewer bells and whistles in Defold compares to Unity, Unreal and Godot when it comes to 3D. Here's a recently released 3D game made with Defold: https://forum.defold.com/t/cashchubbies-island/78183/22 https://forum.defold.com/t/cashchubbies-island/78183/22
- magicalhippo 1y agoRelated ongoing submission here[1], about a game with 60k LOC of Lua using this engine. [1]: https://news.ycombinator.com/item?id=43723088 https://news.ycombinator.com/item?id=43723088
- Ralfp 1y agoI’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.
- LichenStone 1y agoHow does this compare to something like Godot?
- popcar2 1y agoIt'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.
- martinbaun 1y agoThank you, I started Godot recently and I'll take a look at Defold as this is the exact thing I am doing - and Godot seems a little unstable with the APIs. Every tutorial I find is for Godot 3, and Godot 4 seems quite changed.
- barotalomey 1y agogoogle "godot 4 tutorial", not "godot tutorial"
- nkrisc 1y agoThe version 3 to 4 transition was used to make breaking improvements to many things. The API is intended to remain stable within major versions. The docs also cover the major API changes from 3 to 4 and comprehensive docs exists for both version and you can still use Godot 3 if you want to.
- vlovich123 1y agoAm I correctly understanding that this is a for-profit endeavor that’s relying solely on donations?
- jsheard 1y agoLooks like they offer paid support, and the console branches obviously aren't public so you'd have to make a deal to access those.
- britzl 1y agoNo. Wrong. Console branches are available for free if you are approved by the vendor.
- ksymph 1y agoIt'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.
- britzl 1y agoNo, Defold is developed by six full time and two part time developers. All developers are fairly compensated. Most of the work done on the engine is "general development" funded by corporate partners, studios and publishers. There is quite a bit of overlap between the needs of specific partners and the general development roadmap.
- tunaoftheland 1y agoI'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 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.
- Cthulhu_ 1y agoIf 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.
- mtnygard 1y agoAFAIK, King spun Defold back out as a foundation.
- britzl 1y agoYes, this happened early in 2020. Defold has been a public product longer with the Defold Foundation than with King. King has not been affiliated with Defold for a very long time.
- croes 1y agoGiven the addictive nature of Candy Crush it’s a little bit like a drug lord building a hospital. Candy Crush is less deadly than drugs, but a game engine is less useful than a hospital
- bentt 1y agoI 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 1y agoGodot 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.
- saejox 1y agoi wish people would stop mentioning W4 Games as a porting option. their lowest revenue tier costs $2000 a year. most indie games sell a few hundred copies.
- tapoxi 1y agoMost indie games sell on Steam/Steam Deck first and port to consoles later, usually after being picked up by an indie publisher. The $2000 is also to port to all three console platforms, it's $800 per. This makes it feasible to say, only target PlayStation with W4 and use the community Switch port.
- japhib 1y agoYou'd be hard pressed to find console support for much less than that - compare it with Unity or GameMaker's console support tier and you'll find it's pretty similar. It can take hundreds of dev-hours to port your engine to consoles yourself, so having another company handle it for you, for all 3 consoles, for only $2000 is a pretty good deal!
- imzadi 1y agoI was curious about VR development, and after reading this, I'm still not sure: https://forum.defold.com/t/official-refold-stance-on-vision-pro/76367/2 https://forum.defold.com/t/official-refold-stance-on-vision-...
- 383toast 1y agoDoes 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 1y agoIn 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/ https://defold.com/manuals/bob/
- britzl 1y agoNo, data is stored in protobuf text format (and at runtime compiled to binary protobuf files ofc).
- pk-protect-ai 1y agoLooking into the code ... Wow ... This is not C++, it is C with classes ... https://github.com/defold/defold/blob/dev/engine/dlib/src/dmsdk/dlib/mutex.h https://github.com/defold/defold/blob/dev/engine/dlib/src/dm... Any reasons to use these wrappers instead of modern C++ capabilities?
- ksymph 1y agoThere's a great post on that by the lead Defold dev: https://defold.com/2020/05/31/The-Defold-engine-code-style/ https://defold.com/2020/05/31/The-Defold-engine-code-style/
- robterrell 1y agoIn 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.
- synergy20 1y agois Teal widely used? https://github.com/teal-language/tl https://github.com/teal-language/tl Teal to lua is what typescript to javascript
- hombre_fatal 1y agoNo. 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 1y agoI 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/ https://typescripttolua.github.io/
- debugnik 1y agoNo, but Luau (which is more of a fork) from the Roblox studio is seeing growing adoption. Notably, it was used for Alan Wake 2.
- rockyj 1y agoDefold 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/ 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.
- vednig 1y agoA game engine that's opensource and supports Linux. Love it
- Narishma 1y agoIt's not open source, it's source available.
- zerr 1y agoRelated: code-oriented C++ 2D game engine - Axmol Engine. It's an actively maintained Cocos2D-x fork: https://axmol.dev https://axmol.dev
- aaroninsf 1y agoAsk-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 1y agoI'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.
- Nijikokun 1y agoDefold 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.
- 2mlWQbCK 1y agoHow 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/ https://love2d.org/
- shmerl 1y agoHow does it compare to Godot?
- tombert 1y agoNoticed it wasn't on Nixpkgs, so... https://github.com/NixOS/nixpkgs/pull/399843 https://github.com/NixOS/nixpkgs/pull/399843
- James-Bennet 1y agoI 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-fennel-lua-lisp-emacs-and-lisp-game-jam-winner-exo_encounter-667/ https://vxlabs.com./2018/05/18/interactive-programming-with-... https://technomancy.us/188 https://technomancy.us/188
- geokon 1y agoIf you get it working, please share.. I assume you've seen: https://ertu.dev/posts/i-made-an-online-shooter-game-in-lisp/ https://ertu.dev/posts/i-made-an-online-shooter-game-in-lisp...
- f_santanana 1y ago[flagged]
- f_santanana 1y ago[flagged]
- amarant 1y agoIn terms of maturity, how does this compare to Godot?
- bk496 1y agoHow many of these are there?
- rootnod3 1y agoSo, it mentions to support PS4/5 and Switch but doesn't mention FreeBSD? Both these platforms are FreeBSD based.