libgdx/ashley

PooledEngine is not extensible

Opened this issue · 0 comments

I posted a while ago an issue about the PooledEngine not having the option to allow for removal of components without freeing them up in the pool, and that question was ignored.

Since this feature doesn't seem to be wanted in the main library (which is understandable), I thought I would take a crack at making my own PooledEngine with the feature put in. However, this seems impossible for the following reasons:

  1. As is, the PooledEngine uses private inner classes which you can't extend or wrap to change behavior or add functionality (i.e. I would like to extend PooledEntity so I could add in the ability for the user to choose whether or not when removing a component that component is reset)

  2. If you try to create your own PooledEngine it's not possible due to the use of package private variables in the Entity class (scheduledForRemoval and removing)

If I can't wrap/extend PooledEngine or recreate it and my original post's suggestion won't be implemented, then I have no idea how I can get the functionality I need out of the PooledEngine.

I hope this post doesn't come across as too aggressive (sincerely not what I'm going for), but rather as a legitimate concern. If you don't want to go with my original idea, then can at least the PooledEngine be opened up for extensibility without having to jump through so many hoops?