[solved] how to build a C++ AI?

[solved] how to build a C++ AI?

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
Shaitan
Posts: 16
Joined: 04 Jan 2014, 11:54

[solved] how to build a C++ AI?

Post by Shaitan »

hello and happy New Year!

do i have to incorporate the AI sources into the Spring sources and then build and install Spring from the sources? is there another way without building Spring?
Last edited by Shaitan on 10 Jan 2014, 16:11, edited 1 time in total.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: how to build a C++ AI?

Post by abma »

yes, compiling inside spring is recommended as some ai interface / header files are automaticly generated. (afaik)

you can extract all dependencies but imo its not worth the trouble/time.


if you are using linux then compiling should be quiet easy (apt-get install ...), on windows its mostly difficult to setup. also windows compile is mostly broken because atm none/very few develops spring engine on windows.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: how to build a C++ AI?

Post by PicassoCT »

Beherith uses the Windows-way? He said something a month ago about how difficult it was to setup Visual Studio for this .
Shaitan
Posts: 16
Joined: 04 Jan 2014, 11:54

Re: how to build a C++ AI?

Post by Shaitan »

abma wrote:yes, compiling inside spring is recommended as some ai interface / header files are automaticly generated. (afaik)

you can extract all dependencies but imo its not worth the trouble/time.

if you are using linux then compiling should be quiet easy ...
yes, i'm on Kubuntu. i noticed the new release of Spring 96, downloaded the sources, copied the CppTestAI directory in the AI folder, made it my new AI, and built Spring. the AI is now in the Spring lobby list. it took Shard 16 minutes to kill my lone commander incapable of moving.

now it's time to make it do something about its military potential, which is another topic. but when i change my AI, will i have to repeat the whole process of building Spring to see the changes in my AI's behavior?
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: how to build a C++ AI?

Post by Anarchid »

will i have to repeat the whole process of building Spring to see the changes in my AI's behavior?
Afaik if you don't "make clean", the build will be incremental -> only changed or affected files will be recompiled. Which should take at most a minute.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: how to build a C++ AI?

Post by abma »

build targets for ai's exist, you can just compile ai's as well, for example
make AAI Shard Kaik
or sth. like that.
Shaitan
Posts: 16
Joined: 04 Jan 2014, 11:54

Re: how to build a C++ AI?

Post by Shaitan »

make AAI Shard Kaik
oh, that's really neat! :-) thank you, abma!
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: how to build a C++ AI?

Post by abma »

Post Reply

Return to “AI”