Remember my old post about “red pill”? If not, don’t worry, you didn’t lose anything
However, “red pill” is rebranded “Red Monkey” and I have a screeshot that shows its progress:
Here you can see a red jaime that is running an animation because a banana is within his sight, and is managed with Behavior Tree (courtesy of @davebaol 's libgdx-ai) . Here is the logic script:
# # Monkey tree # # Alias definitions import sense:"redmonkey.elements.monkey.SenseTask" import goto:"redmonkey.elements.monkey.GotoTask" import sleep:"redmonkey.elements.monkey.SleepTask" # Tree definition (note that root is optional) root selector sequence sense tag:Banana goto sequence sleep times:5
With reference of my old post, this script is what I called “upper brain”.
Of course, there is the AISpace and senses behind the scene. The code is still a pile of and I have to do some refactoring but at least it works!