Programming artificial intelligence for games, aka Game AI usually is a challenge. And if you are limited by CPU, lines of code, memory and even the programming language itself, it quickly isn't that fun anymore. I just released a free update of CopperCube
, version 4.0.3, which includes an update to the included Game AI behavior. If you ever used it, you know that it is very basic, but with this new update, I made it a bit smarter and a bit more tweak-able. But see for yourself, in this WebGL demo:
The same AI behavior is of course also available if your publish your app as Android app, Windows .exe or Flash .swf file: It uses the same minimal amount of code on all platforms, so it runs very quickly everywhere. As most game "AI"s, there is a simple state machine behind it. Thus calling it "AI" is a bit exaggerated. In this case, the AI has just 4 high level states ("do nothing", "reach position", "attack item" and "die and stop"), and based on the situation, it will switch between the states.
In this CopperCube update, the AI has been tweaked so that it can handle obstacles better, and the user now is also able to set waypoints where the AI is supposed to go. Also, specify how long the AI should wait once it reached its target position is possible now. With this, it should be easier to create nicer games, I hope. But of course: The AI still can be improved a lot. And it is no comparison to the AI in modern games. But it is a start. :)