Live data from Hacker News

Why isn't Godot an ECS-based game engine?

godotengine.org

131–140 of 151 posts

Re: Why isn't Godot an ECS-based game engine?

#131
post #56
post #51

I'm going to have to give a hard disagree. I've been making my own engines for a long time, and have used many different engines for a longer time. Inheritance-based entity systems are often a pain in the ass to work with, a massive pain in the ass to debug, and tend to invite shitty hacks to get around the shortcomings of the inheritance model. The article says that "Godot does composition at a higher level than in…

Composition does not strictly imply inheritance. A DOM tree is a perfect example of composing nodes without inheritance.

Strange to see this worded this way because I often think of composition as the opposite of inheritance.

Instead of “this thing uses this subset of parts from its parent” it is “this thing is composed of this collection of parts.”

Re: Why isn't Godot an ECS-based game engine?

#133
One of the ideas of data-oriented design (of which ECS is ostensibly associated with) is that data storage and application logic should be decoupled. E.g. your logic may be organized as an object-oriented "scene graph" or whatever which under the hood transparently queries data from (say) a columnar store.

It's not clear from the article how Godot entities are organized in memory or if there is even is an abstraction layer between logic and data.

Re: Why isn't Godot an ECS-based game engine?

#134
post #123

Earlier quoted context omitted.

DOTS is not ECS. "Unity Classic" is ECS. DOTS is a more cache-efficient architecture designed to support larger numbers of entities.

Unity's DOTS is definitely an ECS system. You technically can have an ECS without all the data-oriented and cache efficient stuff, if you just want the architectural benefits, but it's pretty hard to build a data oriented game engine that is not fundamentally ECS

Definitely true, having looked at probably 20-30 ECS frameworks in about 5~ different languages between 2019 and 2020. About half of the ones I looked at, probably a bit less, were DOTS.

Re: Why isn't Godot an ECS-based game engine?

#135

ECS or no ECS? it doesn't matter the problem of that kind of engines is the users are computer-illiterates they don't understand how memory/cpu works what happens is 90% of 3D indie games suffer from major performance/optimization issues and we start to see the same kind of performance issues in AAA games, because, as always, we always want to cut costs, everywhere worse, clueless people are gaining power and are get…

You could have phrased that better. A lack of optimization could be a real problem but attributing it to "clueless people gaining power" or calling users of game engines "computer-illiterates" just smells of gatekeeping.

Re: Why isn't Godot an ECS-based game engine?

#136
I always preferred doing ECS at a higher level. Above core engine level. Using ECS to handle stuff like rendering never made sense to me. So for me, Godot's approach is the ultimate one. You model core engine compoments with inheritance and use ECS only for high level behavior for entities;

This is the way. I have spoken.

Re: Why isn't Godot an ECS-based game engine?

#137
post #56
post #51

I'm going to have to give a hard disagree. I've been making my own engines for a long time, and have used many different engines for a longer time. Inheritance-based entity systems are often a pain in the ass to work with, a massive pain in the ass to debug, and tend to invite shitty hacks to get around the shortcomings of the inheritance model. The article says that "Godot does composition at a higher level than in…

Composition does not strictly imply inheritance. A DOM tree is a perfect example of composing nodes without inheritance.

Can you give an example of how the composition works, or where it is used?

With everything inheriting from the Node class, I've only seen it as being an OOP/inheritance system.

Re: Why isn't Godot an ECS-based game engine?

#138
post #59

I'm a bit confused between there's a hugely popular place between inheritance-based entities and ECS (Entity-Component-System), which is what you could call a "Entity-Component system) (notice spelling) or perhaps a Component-based entity composition system. Inheritance based: you derive Vechicle, then derive Tank, Car, etc. This was most used from 95 to 2005 as teams moved to C++. Component based: you create a Tread…

You worked on Commandos ? Holy crap. I'm mid way in to my game development career and played that to death before I even started. Plus 70 hours on Steam as an adult...

If you wanna make me feel old, just consider that Commandos was released 10 years after my first commercial game, so I'm even older. :D Fun bit: I never ever finished a single mission in a Commandos game.

Yeah I did code architecture work on Commandos 1, then led the tech & tools for the expansion and Commandos 2. A lot of the C1 work was related to this topic, actually: when I arrived at the project, it was hard inheritance-based with a fixed set of subcomponents, and I shifted it to a common base for gameobjects (the class "Bicho", really odd name) which contained a collection of arbitrary components that communicated via messages. It was more extensible that inheritance, but very messy - too many assumptions and typecasts. First steps... The Commandos 1 codebase was thrown away and restarted from scratch for Commandos 2.

Re: Why isn't Godot an ECS-based game engine?

#139

Earlier quoted context omitted.

Not about ECS, but speaking of components: I’m developing an unreal engine game and component based programming has been a dream. You end up with the opportunity to create so many pieces of code that are able to be dumb and that don’t need to know about the rest of the system. Then you add come control code that is also as dumb and blind (in a good, decoupled sense) as possible and the whole application comes togethe…

Not to sound rude but IMO I find components really hard to organize and structure data. Components are probably really nice for storytelling games and games with simple logic: they really shine when you can just take some effect like a particle system and attach it to some object like a Sci-Fi weapon. But it's really hard to separate model, view, and controller from your game when they're all separate components on t…

MVC is good for user interfaces, but there is some inherent coupling between model and view in most games. Eg, animations. I didn’t have much luck using mvc outside of the ui. IMHO, single responsibility is the more fundamental principle and components are helpful for that

Re: Why isn't Godot an ECS-based game engine?

#140
post #138

Earlier quoted context omitted.

You worked on Commandos ? Holy crap. I'm mid way in to my game development career and played that to death before I even started. Plus 70 hours on Steam as an adult...

If you wanna make me feel old, just consider that Commandos was released 10 years after my first commercial game, so I'm even older. :D Fun bit: I never ever finished a single mission in a Commandos game. Yeah I did code architecture work on Commandos 1, then led the tech & tools for the expansion and Commandos 2. A lot of the C1 work was related to this topic, actually: when I arrived at the project, it was hard inh…

It's never too late to start playing!

If you ever get around to writing up a technical post mortem I'm sure it would be super interesting. The simulation seemed quite advanced for the low end hardware the game ran on, with view cones, pseudo height, physical objects, footprints, and pretty good AI.

The Commandos series dying out is a great shame, although of course Kalypso is staffing up to attempt a sequel.

What are you up to these days?

Post reply on HN