Live data from Hacker News

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

godotengine.org

11–20 of 151 posts

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

#11
ECS at the game engine level has never been particularly interesting to me, but it is a good way to structure complex game logic. This shouldn't be tightly coupled with the game engine anyway, so I don't find the different architectures awkward. Godot's node-based structure makes a ton of sense for what it does.

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

#12
I'm a novice JavaScript game developer and I'm currently using OOP for my entities. E.g. each NPC is an object with an update method inherited from a base class that gets called every tick. What benefit would ECS actually give me? Isn't the NPC data still just an object but instead of using a shared prototype update method on the object it would be a separate component function? What is the actual difference?

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

#13

I first met ECS when modding an RTS called Tiberian Sun. The units were all defined in ini files and you specified the components for each unit eg the difference between a building and a moving piece was whether there was a movement component etc. And a small but vibrant modding community grew up around it. Everything was dynamic, read from data definitions when the game loaded. One downside to godot’s inheritance is…

While ECS means you're using a "data driven" approach, you can have a "data driven" approach without having to use ECS.

It's all about having configuration data separate to the logic. And use this data to setup and build the game elements.

Here's a couple of videos I created:

How to start with Data Driven Development in Godot: https://www.youtube.com/watch?v=ZG__fXSp74c

What I can do with it in my game, One Way Dungeon: https://www.youtube.com/watch?v=PqZwKahZ3cU

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

#15

Personally, deep object ontologies make my eyes glaze over. Its not like these objects evolved in the wild and their ancestry is somehow interesting. Give me interface definitions any day. ECS is nicer for that.

Gotta thank @cjhandmer for that rant, but it really stuck with me.

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

#16
I might have an easier time following if there were some small code examples.

For example, the article mentions that for simplicity some components require other components to exist. That sounds like something that cannot be encoded in the type system of most languages, whereas the fields present in classes within a class hierarchy are encoded in the type definition.

A code example would help me figure out if I'm following or not.

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

#17
All this hype around ECS started when Minecraft, Factorio and They Are Billions proved that the paradigm works, though that is just a small percentage of games that can benefit from ECS. The rest should use the classic OOP model. I really don't see how a game like Dota, CSGO or your average Battle Royale will be better with ECS. I agree with the article.

There are libraries enabling ECS for you if you are not looking for an engine like Unity:

C++: https://github.com/skypjack/entt (Non-Java Minecraft uses this)

Java: https://github.com/libgdx/ashley

Rust: https://github.com/bevyengine/bevy (it's still work in progress, not battle-tested and a moving target)

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

#19
post #12

I'm a novice JavaScript game developer and I'm currently using OOP for my entities. E.g. each NPC is an object with an update method inherited from a base class that gets called every tick. What benefit would ECS actually give me? Isn't the NPC data still just an object but instead of using a shared prototype update method on the object it would be a separate component function? What is the actual difference?

Hmm, if you only have one system, then yes, those are the same.

But if you have multiple systems (say collision detection, physics, damage/health, control(ai or player)) you can then build things up lego brick style.

For example, a basic wall will just participate in the collision detection system and nothing else, but now it's easy to add in breakable walls by giving them a hp value and defence value for the damage system.

Does that help?

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

#20

All this hype around ECS started when Minecraft, Factorio and They Are Billions proved that the paradigm works, though that is just a small percentage of games that can benefit from ECS. The rest should use the classic OOP model. I really don't see how a game like Dota, CSGO or your average Battle Royale will be better with ECS. I agree with the article. There are libraries enabling ECS for you if you are not looking…

Overwatch is done with ECS, there are GDC talks from the devs explaining the tech behind it.
Post reply on HN