AI Frame working / advanced programming question
by Areal Person · in Technical Issues · 05/17/2006 (2:24 pm) · 2 replies
Ok, I am kind of new to Torque, but I am an experienced C++ programmer.
I am wanting to implement a simple yet extendable (clean cut) AI framework into Torque that will provide me with primitive AI functions. The catch is that it needs to be integrated into Torque in a efficient and reasonably correct manner, the key word here is integrated correctly based on Torques architecture.
So heres my question. Could someone please tell me the correct architecture to use.
Heres some examples of the general type answer I am looking for. But I am looking for someone to tell me some correct ones (highly efficient), at least your best guess.
Architecture solution 1.
Use scriptable objects to implement an ad-hoc configuration interface which would provide calls to object methods for each AI primitive inside the engine and put the implementation code in core.cpp (or whatever)
solution 2.
Use Polymorph inheritance and interfaces to define a C++ object model for the
AI primitives and call the AI methods from these modules file1 file2 etc.
I know theres got to be a better solution than using function pointers and a callback.
Lack of Speed kills in something like Torque, and I dont want to break the architecture.
Not to use big fancy words, but when programming, I am not looking for what to do,
I am looking for the way to do it.
I am sure there must be someone with enough experience and knowledge of Torques architecture to answer this common sense programming question.
It needs to be fast and as dynamic as possiable
Thanks,
I am wanting to implement a simple yet extendable (clean cut) AI framework into Torque that will provide me with primitive AI functions. The catch is that it needs to be integrated into Torque in a efficient and reasonably correct manner, the key word here is integrated correctly based on Torques architecture.
So heres my question. Could someone please tell me the correct architecture to use.
Heres some examples of the general type answer I am looking for. But I am looking for someone to tell me some correct ones (highly efficient), at least your best guess.
Architecture solution 1.
Use scriptable objects to implement an ad-hoc configuration interface which would provide calls to object methods for each AI primitive inside the engine and put the implementation code in core.cpp (or whatever)
solution 2.
Use Polymorph inheritance and interfaces to define a C++ object model for the
AI primitives and call the AI methods from these modules file1 file2 etc.
I know theres got to be a better solution than using function pointers and a callback.
Lack of Speed kills in something like Torque, and I dont want to break the architecture.
Not to use big fancy words, but when programming, I am not looking for what to do,
I am looking for the way to do it.
I am sure there must be someone with enough experience and knowledge of Torques architecture to answer this common sense programming question.
It needs to be fast and as dynamic as possiable
Thanks,
#2
and there is still no AI pack. Unless someone can point it out to me.
There needs to be an AI mod that will add at least 1 layer of abstratction to the script commands.
It shouldent be that big of a deal to build up the object model (Providing you
know where to put it) it dosen't need to have a zillion new features, but it needs to be extendable
by virtue of it's defined implementation protocol, so that you can form the habbit of using the tool.
I could do the code in about three weeks IF I knew where to put things correctly. The problem is that
if you don't do it right it will turn into a quagmire, and people will be waiting forever to get it !
Is there a community web page resource for the AI Mod Project, Is there a link on TDN ?
Do I need to start one ? Or what ?
05/19/2006 (2:38 pm)
I thought there were some people working on an AI Pack. It seems like it has taken foreverand there is still no AI pack. Unless someone can point it out to me.
There needs to be an AI mod that will add at least 1 layer of abstratction to the script commands.
It shouldent be that big of a deal to build up the object model (Providing you
know where to put it) it dosen't need to have a zillion new features, but it needs to be extendable
by virtue of it's defined implementation protocol, so that you can form the habbit of using the tool.
I could do the code in about three weeks IF I knew where to put things correctly. The problem is that
if you don't do it right it will turn into a quagmire, and people will be waiting forever to get it !
Is there a community web page resource for the AI Mod Project, Is there a link on TDN ?
Do I need to start one ? Or what ?
Torque Owner Badguy
I might not know enough but here is my take on it.
Solution 1:
this I feel is the current configuration.
Solution 2:
this I would say is the AIManager object that never really went into full swing.
which I think is a good way to present a solution.
what you have then is a mixture of both solutions.
the AIManager from solution 2 will operate the AIPrimitive from Solution 1.
if you examine things like the foliage replicator, and tie that planning and implementation logic to the AIManager
I think you will come out with what you are looking for.
*shrug* I dont know maybe I'm just keeping your thread alive and someone with a better plan will speak up.