0
\$\begingroup\$

For example I have OOP class of Bullet and I have created the pool and factory. Should I convert it to componet based? Like BulletComponent, then handle by BulletSystem? by the way I'm using Ashley ECS framework.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

DISCLAIMER: I am still a newbie when it comes to ECS so do not consider the following as a definitive answer

To me it seems that a bullet should be an entity instead of a component since it probably has to be rendered (unless you're taking the hitscan route) and has to interact with the world a.k.a. physics.

As for pooling, it depends on what has to be pooled. I'm assuming that for rendering you're using the same texture for all bullets so the only thing that would have to be pooled is probably the physics object which I would handle within the physics system itself. However you could also create a separate BulletPoolSystem if you wish, it's completely up to you.

\$\endgroup\$

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