The beauty of Entity Component System and Command Pattern

Entity Component System and Command Pattern

Entity Component System…

Recently I decided to use ECS (Entity Component System). I wanted to create RTS after many fails. Yeah, I tried so many times that I can’t even count. I love strategy games and I will create one someday. So the time for ECS came and I started to go deeper. I found it pretty useful and I started creating simple game for a programming compo. It’s the „Szalone Mikołaje 2” – here on github:


I love it. I simply create some components. It will store data. Then systems. What they do? They take entities(boxes) filled with components (data) and do some things (algorithms).

And Command Pattern comes…

Ones I needed something which will help me fast create some entities in different places of code. I was searching and I found this: This was exactly what I was looking for. It improved my code.

How to use it together…

So I have entities (boxes) filled with components (data) and systems (algorithms) process them. And here comes command pattern. I want to create new entity with some components and initialize them all with some values. I just use command and done.


I will create a technical tutorial about using it later. (I hope)

But for now, see you 🙂

Dodaj komentarz

1 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
1 Comment authors
Tim Recent comment authors
najnowszy najstarszy oceniany
Powiadom o

Yeah that are really great patterns. Sadly UE4 is somehow mixes class hierarchies but they added a component concept for using composition over inheritance. I think unity does a better job there but did not use this engine.

Well I’m looking forward for your tutorial.
Keep on coding!