2
\$\begingroup\$

I started working with ECS and I am not completely sure that I understand it correctly. As I see it now - systems can implement logic for collision, movement, similar things like that. But would it be correct to dedicate a system for digging game logic only? It has a method for dig action, it also sets animation component to play "dig" animation and listens for event about animation completion after which it executes dig action. Am I doing it right?

\$\endgroup\$
1
  • \$\begingroup\$ It might be correct to implement a "digging system" if digging is a significant or complex part of your game. If it isn't, it's possible that dedicating a whole "system" to it is overkill. It really ends up depending on the needs of your game and the way your architecture is built, as there isn't "just one" way to built entity systems. \$\endgroup\$ Commented Mar 1, 2016 at 16:19

1 Answer 1

0
\$\begingroup\$

It really depends on the kind of game that you are making, but your approach might end up giving you troubles as you add more actions, animations and such as then you would have to actually tell what system has priority over the others to avoid running the dig animation when you're also being attacked, for example.

It's usually more convenient to split up your systems and components making them as generic as possible. So movement, animation, ai, health, gravity, physics are better suited for composing your entities.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.