AI:Development:System: Difference between revisions

From Spring
Jump to navigationJump to search
Hoijui (talk | contribs)
No edit summary
Hoijui (talk | contribs)
No edit summary
Line 6: Line 6:
<br><br>
<br><br>


To get an idea of the overall code and runtime structure of the springs AI Interface system,
To get an idea of the overall code and runtime structure of springs AI Interface system,
have a look at the following diagram.<br><br>
have a look at the following diagram.<br><br>
[[Image:CAIInterfaceCodeStructure.png|thumb|center|722 px|New Code Structure]]
[[Image:CAIInterfaceCodeStructure.png|thumb|center|722 px|New Code Structure]]

Revision as of 07:51, 3 June 2009

Springs AI API

Skirmish AIs are not loaded by the engine directly, but through an interface library. This allows integration of AIs written in other languages. An other idea made possible through this, is a library that can load AIs over the network, and let them run on an AI server (NOTE: this is not planned, just a possibility).

To get an idea of the overall code and runtime structure of springs AI Interface system, have a look at the following diagram.

New Code Structure

briefly: AI Interfaces are plugins for the spring engine, while Skirmish AIs are plugins for AI Interfaces.

Wrappers are comparable to AI Interfaces, but they rather lay between an AI Interface and an AI. They consist of code that adds enhances an interface in some way, and they are compiled directly into the AI library. An example of one is the Legacy C++ Wrapper. It makes the C/C++ AI Interface look like the old C++ AI interface of spring, is used by KAIK and AAI for example, and its code is compiled directly into these AI libraries.

For further info, see AI Interface Development.

History

Global AIs used by spring versions prior to 0.79 have used an AI Interface with the following structure:

Old Code Structure

Therefore, AIs had to be written in C++, and be compiled with the same compiler as the engine.