AI Spring

My Official Stance on the Music AI

A while ago I wrote a proof of concept group AI. It used the windows MCI APIs to play MP3 files based on what was happening in the game, thus generating dynamic music playback.

This was hardly the ideal situation. My feeble attempts at looking into FFMPEG weren’t too thorough and in the end I spent ~4 hours in the early hours of the morning building the simplest example I could with the easiest API I could find.

As a result of using MCI, there’s no volume controls so no fading the music out. The group AI setup also means I can’t tell the difference between canceling a construction project and having a building blown up or a self destruct sequence. These are the two main criticisms of the AI.

With version 3 of the AI, I provided it as is, and didn’t have much time to repackage it with all the music or work on it much longer. This is when Tired stepped up to repackage it himself. Tired put effort into drawing up a lua widget to auto-enable the AI too,although who he bankrolled into this job or if he did it himself I am unaware of.

My official stance

Since that moment I have dropped maintenance of the AI. I haven’t the time or resources to actively maintain more projects than I have despite a constant influx of new work. Although I do take on new projects from time to time, I am far more selective at the present, and I am always looking to delegate responsibility to someone who can take better care of a project, such as the music AI.

There is also the question of the Ogg Vorbis lua playback support added by kloot to 0.76b1. Although some people have complained about its playback quality in comparison to the Music AI, I still believe it is a useful thing to have since the music AI is confined to Microsoft Operating Systems by the MCI API.

Why doesn’t it work anymore?

When new versions of spring are released, the AI interface changes slightly. As a result what an AI expects to see is not what an AI gets, and when the two interact they break. To combat this spring refuses to load AIs built with the wrong AI interface version. This si why the 0.75b2 AI won’t work with 0.76b1.

So how do I get it working?

To fix this someone needs to recompile the AI using mingw32 and 0.76b1 source code. I do not have the necessary time and resources to set up mignw32 and code blocks and compile everything at the moment.

If anyone is interested in building the AI and releasing it I can provide source code and a codeblocks project. I haven’t a clue how to go about using scons for it so don’t ask me about that.I do have a few minor changes to it to make to clean up the MCI wrapper class but functionally it is identical to version 3.

Leave a Reply

Your email address will not be published. Required fields are marked *