Page 1 of 1
[solved] how to build a C++ AI?
Posted: 04 Jan 2014, 12:12
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?
Re: how to build a C++ AI?
Posted: 06 Jan 2014, 17:08
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.
Re: how to build a C++ AI?
Posted: 06 Jan 2014, 20:58
by PicassoCT
Beherith uses the Windows-way? He said something a month ago about how difficult it was to setup Visual Studio for this .
Re: how to build a C++ AI?
Posted: 07 Jan 2014, 13:56
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?
Re: how to build a C++ AI?
Posted: 07 Jan 2014, 14:10
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.
Re: how to build a C++ AI?
Posted: 07 Jan 2014, 14:29
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.
Re: how to build a C++ AI?
Posted: 07 Jan 2014, 14:53
by Shaitan
make AAI Shard Kaik
oh, that's really neat!

thank you, abma!
Re: how to build a C++ AI?
Posted: 07 Jan 2014, 15:51
by abma