Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior tree poolable #86

Merged
merged 7 commits into from
Jun 19, 2017
Merged

Conversation

mgsx-dev
Copy link
Contributor

@mgsx-dev mgsx-dev commented Jan 2, 2017

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

Pool strategy can be configured as follow :

  • If you need to pool entire trees, you can use the PooledBehaviorTreeLibrary implementation (or one of yours). Pools are indexed by tree reference. Shouldn't be used if you modify tree after creation.
  • If you need to pool individual tasks types, you have to implement pooling in your TaskCloner.
  • By default, trees and tasks are not pooled at all (for compatibility).

@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
Copy link
Member

davebaol commented Jun 18, 2017

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
Copy link
Contributor Author

It should be OK now.

@davebaol davebaol merged commit 6f5199e into libgdx:master Jun 19, 2017
@davebaol
Copy link
Member

Thanks @mgsx-dev

@davebaol
Copy link
Member

@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
Copy link
Contributor Author

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
Copy link
Member

Great work! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants