In the second part of this article series on entity-component systems, we are going to take a look at how entities can be managed. Don’t forget to read part one which explained the very basics of the entity-component paradigm. Today we are finally going to start writing some actual code on entities management. The manager Some implementation define the manager (the big class reponsible for handling entities and their components) as a singleton.
So you have just finished developing the class for the zombie knight of your upcoming game. His animation is smooth, his AI perfect, you are proud. He had a lot in common with the mad cleric you developed two weeks ago, except for the way he fights, so you just copy-pasted the parts that were similar. You are not going to modify those any time soon anyway, are you? The next day, your friend comes over with a great idea for a new kind of magic for the player.