Why isn't Godot an ECS-based game engine?
Whether or not to make your game have ECS has been debated for years, probably rightfully so to some extent. I ended up writing something like this myself for my own 2D game engine. To name something, it&#x27;s greatly decoupled, but it also means any algorithm (i.e. system if you will) can literally access any data from any object in your gameworld. It just breaks encapsulation to a huge extent, any data you add is immediately visible to every of these systems and in most cases, you cannot reason what inputs&#x2F;outputs a system really has. That at least goes for the generic solutions out there.<p>However, I think this blogpost tries to argue against ECS for all the wrong reasons. I&#x27;m not going to go into every detail, but let&#x27;s start out with this: I don&#x27;t want to bash on Godot, I think it&#x27;s amazing they&#x27;re pushing the game engine scene, but a blogpost like this really makes me question the quality of what they wrote.<p>&gt; Inheritance is more explicit<p>I cannot remember a time I ever found it useful to look at an inheritance diagram that presumably will be littered with diamond patterns. Besides, inheritance isn&#x27;t immediately excluded from other codebases, it just isn&#x27;t the core principle of their software design for composing objects. Also also, I might have hundreds of (slightly) different objects in my game, so even without diamond patterns, that inheritance hierarchy is not going to be very useful to me.<p>&gt; Scenes are more explicit<p>I&#x27;m looking at the picture and I&#x27;m not sure why I want a scene graph to show my inheritance patterns in the first place! If you ask me, it clutters the scene graph with details about this object. I mean, not unworkable, but I cannot understand this is an advantage. Besides, easily replicated by listing the components that an object is composed of in any game engine, it&#x27;s not like other editors&#x2F;game engines can&#x27;t do it. Most engines do this with a separate view that shows all the data for this object.<p>&gt; Re-usability improves
This one is beyond hilarious if you look at some of their source code. The 2D vs 3D is a prime example, take audio_stream_player_2d&#x2F;3d for example. A lot of the functionality has been copied between their counterparts (with some inconsistencies, of course). That&#x27;s kind of logical from the structures, since the algorithms and data they operate on has been completely sealed off, so they couldn&#x27;t even decently share it if they wanted to. It seems completely due to the fact that at the top of the hierarchy sits a hard distinction between 2D and 3D nodes.<p>To then point out you don&#x27;t even need something like prefabs (for those not familiar: think of a template&#x2F;blue print of a pre-composed entity with data already filled in) is just a weird stab. You could just as easily create such a pre-composed object in code with any component-like design, Unity&#x27;s prefabs just give you the flexibility to compose these in the editor instead. How is an architecture where I need to explicitly type code to compose new objects ever easier than that?<p>There are other things I&#x27;d find questionable by a quick glance over that codebase that are also a side-effect of these architectural choices. Like, singletons that are used to combine nodes of the same type to form some spatial datastructure, because those nodes cannot be easily made aware of each other. There seems all kind of implicit dependency issues and I&#x27;ve always struggled with nicely engineering dependencies in such architectures as well.<p>But I&#x27;m going to stop here, there&#x27;s just too much I can go on about in this blog (I would even consider dedicating an entire blogpost myself breaking my disagreements down).<p>The whole tone of: we use inheritance and we think it&#x27;s better for the entirety of our software is just strange. As always, inheritance is a tool, you should use it when it&#x27;s right, yada yada. If you use multiple inheritance and end up with diamond patterns, I don&#x27;t think I&#x27;m the only one that would say that you should reconsider. Shoving all your logic for every aspect of your program into single objects has rarely worked well either.<p>I already mentioned what I dislike about the generic ECS that everyone keeps talking about like in Unity, but they can improve their architecture and&#x2F;or apply DOD without doing a 180 into that direction. This weird deflecting of potential architectural flaws certainly didn&#x27;t sell Godot to me, but hopefully they come back to this post and think it a couple times over.