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
allow unsupported type parsing for task attributes #87
These changes allow custom behavior tree parser to support types that are not supported in default parser.
One of my use case is to allow Interpolation (gdx.math) type for some task attributes. Since there is several ways to parse such type, I think it's better to let developers subclass default parser and implement it as they want.
Interpolation could be handled like this :
It could be simple strings like "linear", "sine", "swingOut"...
It could be more complex definition like distributions : "pow,2", "pow,3.7"...
There might be better solution inspired by JSON.Serializer (distribution parsing could be implemented in serializer as well) but it implies more changes and maybe some drawbacks.
These changes allow custom behavior tree parser to support types that are not supported in default parser.
One of my use case is to allow Interpolation (gdx.math) type for some task attributes. Since there is several ways to parse such type, I think it's better to let developers subclass default parser and implement it as they want.
Interpolation could be handled like this :
There might be better solution inspired by JSON.Serializer (distribution parsing could be implemented in serializer as well) but it implies more changes and maybe some drawbacks.
What do you think ?