A small project done while on holidays, the spaceships will go towards each other, shoot when facing the enemy, try to dodge bullets and move away from the other spaceship if too close.
Not complex, and not very good to make to computers kill each other, as they tend to spin around the enemy, that's why friction is added. I believe this would work better with a human-controlled spaceship, but it's still fun to watch them shoot each other.
No credit necessary, although if you use it in a game I'd like to know it.
Like you said, not very complex. You had a large advantage over my Aircraft AI engine, which was the turning to face the enemy. The only problem I see is their constant identical patterns when they're trying to shoot each other. They continue to circle around, only rarely facing each other.
This would be much better off with another player rather than CPUs, as you said. I would've preferred that you put in a controllable character. Making AI is pretty difficult, good job.
You need to have a better turning code, so they won't repeat, also, try using paths, not self made paths, but have them generate a path quickest to get to the enemy and how to face them. I have a script for the turning, and a couple .gex files for the movement planning.
I'm thinking of improving this, but I still haven't thought of a way to stop them from spinning around each other.
#4
Posted by
Sinistrade on April 02, 2008 at 03:25 pm
Itīs quite good. You should try adding different states, like attack, avoid, defend, etc. with different behaviours. It would be cool to see a change in strategy in the middle of the fight.
Remember real AI is supposed to learn. If they spin around each other and haven't shot for a while, then they should come up with a different approach. It's not that hard, really. It's a lot like what my Lixies do.
I liked it a lot. after messing with it for an hour or so i made one of the fighters human controlled. having a human fixes the turning error so it's all good now. Message me if you want my fix