Search This Blog

Tuesday, July 8, 2014

Captain Zero Still working on enemy ai

OK fighters are back.  I made an abstract "shipbrain" that hopefully can take care of any enemy movement by tweaking values like "how close does it get to you before it either stops or turns away" and "when does it circle back..."  does it try to get behind you or flank you or just go toward you.  There are also some flocking algorithms I can give them so they'll be aware of each other, not just their target.   I think those should be states, though.  I don't have to make them play 3d chess with Spock  or win at Jeopardy, I just have to make them fun to blow up.

To get targeting to work the flexible way I want it I had to have teams --right now an enemy ai just picks the closest ship that's not on its team... to do this I had to have 2 variables: One for what team the ship is "really on" and another for what team other ships see it as.  This is the same most of the time but it doesn't have to be --which opens up some possibilities I never thought of before.   Mainly I just want to be able to have as many teams as I want.

I love in games when you go into a battle that's kind of going on around you without necessarily you being the focus of it.  Like in Halo 1 when you first see covenant fighting flood in the distance.  You just want to hang out and let them fight for a while.   It gave me that "whoa" feeling I got when a Berzerk robot first shot another..

A really good old school example of this is in the game Crossroads. It was made by a guy in the 80s for the Commodore 64.

http://www.dessgeega.com/crossroads.html

There's so much going on-- tons of destruction... most of which doesn't involve the player at all really.

No comments:

Post a Comment