FLECS - The Fast Lightweight Entity Component System (C/C++)

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • Today we are checking out FLECS, the Fast Lightweight Entity Component System, a cross platform open source C99/C++ 11 based ECS. It can work with other engines like Unreal, Unity or Godot, or can be used in any other project, with bindings for several languages (C#, Lua, Rust, Zig).
    Links
    gamefromscratc...
    -----------------------------------------------------------------------------------------------------------
    Support : / gamefromscratch
    GameDev News : gamefromscratc...
    GameDev Tutorials : devga.me
    Discord : / discord
    Twitter : / gamefromscratch
    -----------------------------------------------------------------------------------------------------------

КОМЕНТАРІ • 38

  • @gamefromscratch
    @gamefromscratch  Рік тому +2

    Links
    gamefromscratch.com/flecs-fast-and-lightweight-entity-component-system/
    -----------------------------------------------------------------------------------------------------------
    *Support* : www.patreon.com/gamefromscratch
    *GameDev News* : gamefromscratch.com
    *GameDev Tutorials* : devga.me
    *Discord* : discord.com/invite/R7tUVbD
    *Twitter* : twitter.com/gamefromscratch
    -----------------------------------------------------------------------------------------------------------

  • @isweartofuckinggod
    @isweartofuckinggod Рік тому +36

    "it can run on a toaster!"
    weird flecs but ok.

  • @dadlord689
    @dadlord689 Рік тому +26

    Kind of weird that I just have looked on it and now there is a video about it in my feed. WTH?

    • @RealPeoplePerson
      @RealPeoplePerson Рік тому

      Same! Been reading up on it all weekend-and here comes a video!

    • @IronKore
      @IronKore Рік тому +1

      Googles always watching me....

    • @blackcitadel37
      @blackcitadel37 Рік тому +1

      They're testing GPT-5. You've been chosen

  • @DavidEvans_dle
    @DavidEvans_dle Рік тому +36

    Running it on my toaster! Imagine making breakfast.
    EntityBread has flourComponent, MilkComponent, YeastComponent...

    • @alexs2195
      @alexs2195 5 місяців тому

      A toaster cant make bread, it just toast it, its TOASTER

    • @jwadaow
      @jwadaow 4 місяці тому

      @@alexs2195 The beauty of ECS is you can add a kneading component and bake the entities before toasting.

  • @יובלהרמן-ח2ד
    @יובלהרמן-ח2ד Рік тому +2

    I fill like I'm drowning in tools and concepts lately... really hard to keep up

  • @Stowy
    @Stowy Рік тому +11

    i wonder how it compares to entt

    • @averageturtlee
      @averageturtlee Рік тому +2

      I was wondering the same thing!

    • @theytittylyrics
      @theytittylyrics Рік тому +6

      Imo Flecs is more fitting for games since it supports hierarchies out of the box

    • @Jaynitix
      @Jaynitix Рік тому +3

      I've used both and eventually decided to stick with entt despite some appealing aspects of flecs (namely compile times). In flecs performance degrades quickly as fragmentation occurs - it's fine I'm sure if you want to design around that but I very much prefer not having to care about fragmentation with entt.

    • @michaelzomsuv3631
      @michaelzomsuv3631 Рік тому +1

      @@Jaynitix What? When's the last time you used flecs? How did you measured these so called fragmentation problems? That just sounds innacurate.

    • @Jaynitix
      @Jaynitix Рік тому

      ​ @Michael Zomsuv Only a few weeks ago. It is trivial to reproduce by creating a function to add some number of dummy components to entities to introduce the table fragmentation. My setup was around 80k entities with up to 30 added dummy components. I saw a 4x frametime increase with flecs and no difference with entt (as you'd expect) from roughly the same starting point before adding the dummy components. As I said though, there are ways to design around it and there are various discussions on the flecs discord channel about how you might do that - but for me I'd rather not have to worry about it.
      Another way to see this is using the built-in hierarchy system - it introduces fragmentation due to how it represents the child/parent relationships. Just create a lot of entities with fine grained hierarchies.

  • @Whag09
    @Whag09 Рік тому +14

    does it run crysis ?

    • @snesmocha
      @snesmocha Рік тому +6

      um, do you realize this is an ecs and not a pc right......
      edit, meant to say ecs, not game engine

    • @eightsprites
      @eightsprites Рік тому

      yes

    • @ArnCiS96
      @ArnCiS96 Рік тому

      It will

  • @alec_almartson
    @alec_almartson Рік тому +3

    It sounds very interesting to have a game implemented with DOTS (ECS) in UNREAL ENGINE 5.2... how Performant can it get? 😮

  • @wanbabigyu
    @wanbabigyu Рік тому +1

    is there any tutorial about how to use flecs in unity?

    • @kodingamedev
      @kodingamedev Рік тому +5

      For Unity you would use DOTS to use ECS

  • @perelmanych
    @perelmanych Рік тому

    I looked at Tower Defense example and it uses only flecs. Does flecs also have some basic rendering capabilities?

    • @leonss2356
      @leonss2356 11 місяців тому +5

      no, I guess they just implemented a simple webgl renderer

    • @sasichkamega
      @sasichkamega 6 місяців тому +1

      Tower defence uses sokol render

    • @sweettea-hv1ls
      @sweettea-hv1ls 6 місяців тому +1

      Isn't it supposed to be engine agnostic?

  • @DylanMatthewTurner
    @DylanMatthewTurner Рік тому +1

    Wow they made Bevy for Rust--

  • @2dapoint424
    @2dapoint424 Рік тому +1

    So who all using FLECS?

  • @Goalatio
    @Goalatio Рік тому

    And… deprecated.