Ai architecture to fit with JMonkeyEngine

Hi all,



I starting with Jmokey after spent some time with Gamekit. I am like very much this plataform. It has nice docs, lots of features, quiet complete to make games. I spent some day reading all docs trying understand the framework. I like very much of AppState´s, i saw booksamples from repository, it was very helpfull. Now, i trying to integrate an IA framework based on hierarchical behaviors. I can´t understand how can i acomplish this, i saw this thread, but it´s dead. My idea is do somethign like that. I was think in create something like a AIAppState to iterate over all actions registred on it. I have looked CustomControls, i don´t know if work to this.



any help would very appreciated.



thanks.

Controls are something that work on a spatial. So you can have an Action control that essentially handles the actions for an Actor. What actions it is supposed to perform can be calculated above that, in a separate piece of code, likely an AppState.

So your AIAppState can run every frame, find “Actors” with an AIActionControl, and give those actors new actions to process. You could push this down onto the actual AIActionControl if you wish, it depends how you want to implement it.

So yes, AppStates and Controls are a good way to handle AI.



(Note that the classes I mention: AIAppState, AIActionControl, etc, do not exist and I just made them up as an example)

1 Like
@Sploreg said:
Controls are something that work on a spatial. So you can have an Action control that essentially handles the actions for an Actor. What actions it is supposed to perform can be calculated above that, in a separate piece of code, likely an AppState.
So your AIAppState can run every frame, find "Actors" with an AIActionControl, and give those actors new actions to process. You could push this down onto the actual AIActionControl if you wish, it depends how you want to implement it.
So yes, AppStates and Controls are a good way to handle AI.

(Note that the classes I mention: AIAppState, AIActionControl, etc, do not exist and I just made them up as an example)


Hi Sploreq,

I found some ideas about on Monkeyzone, i found http://hub.jmonkeyengine.org/2011/02/13/monkeyzone-a-jme3-game-from-the-core/>MonkeyZone – a jME3 game from the core and source code too

I will start from here, thank you.