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

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • entt

    Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more

  • 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.

    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

  • Flythrough.Space

    Top down space captain RPG

  • Here's a real example from a project I worked on in my homebrew ECS framework and later implemented in Godot: a guided missile.

    In the ECS project the notion of 'thing that can run into other things and do damage' so totally separate from the notion of 'thing that is driven around by AI.' So adding guidance to an existing projectile wasn't too much of a pain. In the Godot project I'm dealing with networking as well, so the division is between fire-and-forget projectiles (derived from Bullet) which know about hitting things and doing damage, and AI driven Ships with AI or player driven movement which needs to be synced over the Network. In that case I had to copypasta the AI driven movement code into a 'guided' class under Bullet. That said, for almost every other task, Godot's composition first model has been way easier to work with, especially because it lets you test elements in isolation. Here are the two projects if you'd like to compare the code:

    Homebrew ECS framework on top of the babylonjs engine: https://github.com/EamonnMR/Flythrough.Space

    Godot with networking:

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • mpevmvp

    EV Mechanics in Multiplayer. (by EamonnMR)

  • specs

    Specs - Parallel ECS (by amethyst)

  • If you are making a game, instead of a game engine, you can have your cake and eat it too -

    https://godot-rust.github.io/

    Allows you to pair Rust with Godot comfortably via gdnative.

    Then use one of the good ECS systems in Rust like -

    https://github.com/amethyst/specs

    or (archetype style ECS)

    https://github.com/amethyst/legion

    To get spun up on ECS in Rust I suggest -

    http://bfnightly.bracketproductions.com/rustbook/chapter_0.h...

    This won't get you a godot project but will get you a basic concepted game you can then port into godot-rust.

  • Celeste

    Discontinued Celeste Bugs & Issue Tracker + some Source Code

  • I've heard this so often, and I still don't quite get it. Let's say most of my game objects have a "Position" component, and all the X/Y coordinates are now in one big integer pool. With this setup I can now add 5 to each object's X position really efficiently. But what's the use case for that? Particle systems, and what else?

    My game objects always look more like Celeste's Twitter-infamous Player class: https://github.com/NoelFB/Celeste/blob/c32f134d210fcf710d750...

    Say about the length of the file what you want, but isn't it actually better for caching that all of the Player's instance variables are in one object, and not stored in components somewhere else?

    (Maybe I've looked at the wrong toy ECS implementations, but I always found Ruby-style mixins much better to structure game logic than either ECS or single-inheritance hierarchies.)

  • godex

    Godex is a Godot Engine ECS library.

  • I'm a fan of Godot, so I'll state that in the beginning, so I'm biased. But I took a look at her(?) GitHub page and wondered why there isn't more effort being put into this branch. Even from his own words, ECs is a more efficient style when a large number of objects/nodes are involved, or when optimization becomes important.

    At the moment Godot is really only viable as a 2D engine, as it tends to bog down when used as a 3D game engine even though it has all but replaced the default Blender engine (their recommendation). So in order to get a viable 3D project, a user would have to use an experimental ECS version (no offense to the creators, they are working hard and I do have high hopes for this project. I'll most certainly be experimenting with it) using the C# version, which is still fairly new.

    Now, the fact that a small group of devs can make an indy project/proof of concept with Blender and Godot, or students can make a group portfolio that is viable - these things are AWESOME. Granted. But it still comes out of a quasi Frankenseinian lab as they have chosen to go with OOP instead of ECS, it seems, even though a path does seem laid out before them.

    P.S.

    here's the link to the ECS project:

    https://github.com/GodotECS/godex

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts