Entity Component System (ECS) - Definition and Simple Implementation

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

This really helped me to finally understand what the hell ECS actually is. Thank you, kind sir.

Salantor
Автор

I've shattered up. The clean code that does the job better (100 times) than code of mine (about 10k lines of code I was proud of). Okay, the man of great mind, you beat me. I realized than my programming skills isn't that great as yours.

barondominiclexertux
Автор

I am working on implementing my own basic ECS for the first time and this video is extremely helpful! Thank you!

beepisinthezipper
Автор

This has to be in the top 5 YouTube videos on the subject. You should be a professor or run paid courses because that was the best explanation on the subject.

VoyivodaFTW
Автор

I like topics discussed on this channel
Appreciate what you're doing!

JohnDoe-mrmq
Автор

Thanks for this well explained video, this gonna help me a lot to implement ECS in my game that I am writing in c++. You made one of few videos that really implemented ECS and no just a bunch of components with logic implemented in.

yrds
Автор

Damn I wish this was the first video I came across trying to learn this. Thanks for the very clear explanations and walkthrough dude

leonlysak
Автор

Thanks. Very useful information. Even if the concept is not new, its sometimes hard to see through the jungle of buzzwords. Also liked you showing code in C, which makes it very easy to understand.

bithunter
Автор

I found your channel just recently and I love your videos and the knowledge it provides.

osx
Автор

In the case of bird subclasses, interfaces are used in OPP, example creating a CanFly interface

fabiocroldan
Автор

Wow tht is amazingly helpful as i learn unity dots, getting understanding of it under the hood is priceless, thank you!

ChronoWrinkle
Автор

Nice straight forward code. Maybe use an enum to help with the remembering part that makes you uneasy.

kavorkagames
Автор

it would have been intresting to see how you'd add a new type of entity with it's own behaviour.
I was thinking about adding a new flag array (or expand alive-array), that stores what is the type of the entity, and use that, but then if you'll have tons of entities, the system part can be overloaded with if statements.
Anyway loved the video! :D

vapandris
Автор

Cherno mentioned something really important. If you create entities that can have multiple components, store them as pointers or even worse, create them inside Entity, you will end up with high memory usage and in case of iterating through components and dealing with elements, it will become a huge mess with bad performance. Idea of having entity just as an ID or keep this connection to component but within systems, iterate over components, not entities itself is much more appealing and performant.

anonimowelwiatko
Автор

Nice video. I have a question though. Since you use a bitmask on the entities to store which components they have, that heavily depends on the order in which you register the components. If you suddenly change the order in which you register them, the system fails. Do you have any plans for handling that? I'm asking because I'm working on my own ECS as well, but can't figure out how to solve this problem.

bollebips
Автор

Wow nice video, Found this randomly, Will follow your channel

astroid-wspy
Автор

I Love Default Cubes in Any Kinds of 3D Game Engines

cyanuranus
Автор

does using a bit field to filter entities in this implementation mean the number of component types we can create is extremely limited? For example would using a 64 bit int as the bit field mean our application can only have 64 component types? If so then this really isn't going to be enough for many applications, what would you suggest as an alternative to using a bitfield here?

pheeD
Автор

Nice explanation. What font are you using in your terminal?!

AntonioIvoDaSilvaGomes
Автор

How does your ecs_query handle many systems and many (MANY) entities? I really like the approach you've laid out here, it's helped me in developing my own, but this seems to be a possible bottleneck since this must be queried on every call of your system function. I guess since you don't have a concept of a 'system' in your framework (meaning you aren't keeping any internal state for systems), it's hard to get around this problem, though.

spacedoctor