I've build a architecture based on the entity-component-system-idea. So I got

  • Components - Just store Data
  • Systems - Operates isolated on Components
  • Scripts - Which are just objects from type Script and attached to a ScriptComponent. A ScriptSystem will execute the init() and update() functions on the scripts then.

However, I'm wondering where to place the central game logic since the I have to check a few things about the overall game process, holding the map, counting the points, checks the points if they are enough for the end-screen, etc. ...

Should I create a single entitiy with just such a script attached to it or are there better solutions out there?


1 Answer 1


Given what you've described of your architecture, a script seems like a reasonable option.

However, it's also possible that you can put this central logic in regular code (that is, not part of the entity system). Just because you have entities and components does not mean that everything has to be one.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .