libgdx / gdx-ai

Artificial Intelligence framework for games based on libGDX or not. Features: Steering Behaviors, Formation Motion, Pathfinding, Behavior Trees and Finite State Machines
Apache License 2.0
1.18k stars 241 forks source link

Behavior tree poolable #86

Closed mgsx-dev closed 7 years ago

mgsx-dev commented 7 years ago

As discussed in #12, here is changes to make behavior trees poolable.

Pool strategy can be configured as follow :

@davebaol : there is one minor impact in wiki (call to "reset" method have to be replaced by "resetTask") but i can't PR wiki changes with github. Maybe a pool subtopic would be helpful for developers.

Please feel free to make suggestions about design/code, I'll try to fix ASAP.

davebaol commented 7 years ago

Sorry for being late. I'm going to merge this PR if you fix the conflicts and update Parallel#reset in order to take into account the orchestrator

mgsx-dev commented 7 years ago

It should be OK now.

davebaol commented 7 years ago

Thanks @mgsx-dev

davebaol commented 7 years ago

@davebaol : there is one minor impact in wiki (call to "reset" method have to be replaced by "resetTask")

Done! Could you please quickly document this feature?

mgsx-dev commented 7 years ago

Sure! I added something in the wiki : https://github.com/libgdx/gdx-ai/wiki/Behavior-Trees#pooling. Please review it, English is not my native language :-).

davebaol commented 7 years ago

Great work! Thanks