Why The New Interface?

Why is there a new AI interface? Lets clear up some misunderstandings and explain things nice and clearly!I’ll start by explaining the problems with the old interface and how things are changing, but first lets lay some myths to rest.

Myths?

Its a common conception that AI developers have abandoned the content, and are embarking upon an orgy of development by reinventing the wheel and cavorting with new and exotic programming languages nobody needs. This is nonsense, ignorant speculation by people who didn’t read the forum threads and made wild assumptions without any effort to understand the problem.

Its also seen by many that lua has made native AIs obsolete. This is nonsense, since lua AIs lack the vast amounts of code available to native AIs, such as geometric processing libraries, and networking, etc. Lua AIs are also much slower, something that is very important in an AI. There is also a vast amount of pre-existing algorithms that native AI code can make use of. What’s more a native AI only runs on one machine in a multi-player game. Whereas a lua AI runs on every single machine, resulting in everybody lagging not just one person, and lots of duplicated calculation. Thankyou to lurker for pointing out that lua AIs no longer run synced.

What Is The AI Interface?

When you play against the computer, the computer has an AI in it that tells the computer controlled units what to do, how to behave, where to build etc etc. These are called skirmish AIs, and they’re built by AI developers who contribute to the community. Their code sits in a dll/so library which the sprign engine uses via the ‘interface’

What Was Wrong With The Existing Interface?

The interface was initially satisfactory for the most part. It worked! But as time went on, it got messier. Guidelines where introduced to keep it tidy and they were flouted and it became a great big spaghetti monster of code, making it harder to learn the API and build new AIs.

After all this de-motivational code bloat, the engine moved to Linux support. One of the main requirements being the use of a specific compiler, mingw32. Most active AI developers however used Visual Studio, and the change to mingw32 was not welcomed. With Visual studio, all one had to do was load up the project and press build, and hey presto, out popped a dll! Debugging AIs was also much easier.

Mingw32 however changed everything. There were issues with setting up the build environment, IDEs that didn’t quite work, command line tools, new libraries, slower execution speeds, larger dll file sizes, etc, etc. Annoying quirks such as needing to put the AI on the same hard drive as the compiler, and fixes for Vista due to bugs in mingw made the whole system a tedious nightmare. What’s more, because it was a C++ AI interface, AI developers couldn’t just go back to visual studio without dragging the rest of spring with them and loosing linux support.

As a result most AI developers lost their momentum, the number of new AI projects appearing nose dived, and AI development ground to a halt for the most part.

How Is the New Interface Going to Fix This?

The new interface is a C interface, not a C++ interface. This means that AI developers are no longer bound to the mingw32 compiler, and can now use Visual Studio once again fi they wish. This makes the build process infinitely easier, and should be a huge boost to AI development.

Because the interface has also been redesigned, it has been envisaged that a more generic message based approach be taken to safeguard the interface against compatibility issues and future changes, as well as encourage a more modular approach to AI design. This means it should be easier for new AI developers to pick up and learn. A compatibility layer has been written to allow the existing AI codebase to carry on ontop of the new interface.

Since the new system is modular, a system of wrappers and implementation libraries has been introduced, allowing new languages to be added, such as C#, Java, or even D. Since not all programmers know C++ , this expands the range of potential developers, aswell as giving new tools to AI developers.

A shift in how lobby clients declare AIs has also taken place, presenting a unified mechanism for specifying AIs rather than one for lua AIs and one for c++ AIs. AI options are now possible too. The group AI interface has also been removed.

Next post

Kaempfer Zeon Mobile Suit

Previous post

Spring Wallpaper Pack 1

Other Posts You May Like

Want an avatar too?

You can get one here at gravatar.com!

Gravatars will are used on blog comments and are tied to your email address.

click here to find out more

Leave a Reply