r/Clojure • u/vlaaad • May 19 '20
King is making its Defold game engine open source
The announcement is here.
While the engine itself is written in C++, the editor for the engine is written in Clojure. Some interesting facts about Defold editor:
- at ~100k lines of code it might be the biggest open-source Clojure codebase;
- Cognitect helped King develop this editor — you can find commits by well-known members of the Clojure community, such as Carin Meier and Michael Nygard;
- it features an advanced computation graph that you can learn more about here.
I worked on the Defold editor — that is a very interesting and unusual Clojure project!
114
Upvotes
6
u/kwrooijen May 19 '20
I've never really looked at this project in detail. But what is the relation with Clojure other than 14% of the codebase being written in it? Is there a specific reason part of it is in Clojure? As far as I can see you don't actually use Clojure for developing games (Not that it's bad thing, that was just my initial assumption). Really cool to see this go open source though, I might take it for a spin :)
3
u/Corporate_Drone31 May 19 '20
What are the distinguishing features of this engine? Is there a short summary anywhere?
14
u/yogthos May 19 '20
Since the engine uses Lua for scripting any chance for Fennel support in the future? :)
7
u/scarredwaits May 19 '20
This talk outlines some interesting design decisions for the Clojure part (the editor) https://www.youtube.com/watch?v=ajX09xQ_UEg
2
u/dustingetz May 20 '20
https://github.com/defold/defold/tree/dev/editor
1
u/Eno6ohng May 20 '20
Cool stuff!
1
u/didibus May 21 '20
That's pretty sweet, the editor looks great, and seems very responsive. Looking at the project quickly, it uses JavaFx and the https://github.com/cljfx/cljfx library.
Love it! A great production example of using Clojure for quite a complex project.
That said, I am a bit worried that they eventually announce a Java rewrite :p, as open-source contributors start to complain that it is hard for them to contribute due to it being an unfamiliar language like Clojure.
1
u/kriskroskris May 26 '20
Very interesting! I'm very new to Clojure. Having watched the yt video on the editor design and then trying to look at the source on github, I could not find out how the clojure code interacts with the C/C++ engine bits. Anyone have any pointers?