Home Games WIP Examples User Dir Affiliates Forums IRC FAQ Rules Terms Register

Username:
Password:
Spaceship AI
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.

DOWNLOAD NOW
Information
Language:
Author:
Date:
Downloads:
Comments:
Rating:
GM 6
Sinistrade
Apr 01, 2008
154
11
7.2 (5 votes)

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.

8/10
#1 Posted by Kilin on April 01, 2008 at 04:32 pm

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.
#2 Posted by Xxypher on April 02, 2008 at 08:56 am

Its good but not amazing. Also vwhat does the alarm in the spaceships do?
#3 Posted by Mat on April 02, 2008 at 12:42 pm

@Mat:I forgot to delete that

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.
#5 Posted by DoctorM64 on April 03, 2008 at 07:58 pm

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.
#6 Posted by Kilin on April 03, 2008 at 09:42 pm

I adapted it so that they shoot each other more often, it's funner that way but it's not great. Like Doctor said it should have multiple states.
#7 Posted by cata100 on April 21, 2008 at 10:26 pm


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
#8 Posted by Tikaboon on July 01, 2008 at 02:52 am

nice but not the best:l 6/10
#9 Posted by simonb on October 18, 2008 at 06:12 am

Nice, but not very complex. You need to get focus on physics on this example. There were a few disadvantages in this example. You see, the patterns were identical when they shoot each other. And, then, they circle around by just facing each other spaceship. I rather get a 6 out of 10 on that one.
#10 Posted by koldmonster1 on February 12, 2010 at 11:33 am
September
[NO TITLE]
ArcaDorm
Dwarf Fortress
Pokémon Lost Silver
MATH CHALLENGE
NOTHING ELSE MATTERS
..."I Don't Know, But Look
Shensetta - Land Star
Calculus Summer Homework
sup guys?
Salaam, Strangers!
Boobs and Butts
New Flash/Spoiler/Tab BBCode Tags
Back in NYC + Sketches
Guests: 24
Mush19:05
twisterghost19:05
Grand-High Gamer19:04
eagly19:00
Cyrus18:57