[Sigma Tau] Dev Log 05 - AI

I haven't done much recently, I had a week long vacation and some other stuff, so Sigma Tau has not gotten much work. I have made some little improvements here and there. I did a little playing with a gravity well, and done plenty of flying around. I made the bullet destroy ships, but no damage or explosion or anything.

The big thing which is next on my to-do list is some sort of enemy AI--a daunting thing. Right now I am wanting just a super basic AI, just point/fly toward the player and shoot. AIs have never been my thing. Do you have any advice in going about an AI?

Comments

  • AI always seems like a big task. But, making it into small chunks makes it managable.

    Bunch of things that spring to mind are:

    Pathfinding is something different then flying to a target, they are only losely connected. This allows you to improve pathfinding without breaking flying.

    Do not let the AI visibly cheat, cheating AI can be fine, as long as the players do not notice.

    Random is bad. Some randomness can be good, but the goal of game AI is to provide a fun experience. Predicability actually helps with that, as your players can outsmart the AI.

    Score based descisions, for example in EE, to selevts an enemy target, I assign a score to each enemy and pick the highest one. To prevent flipflop between two targets you add some score to your current target. This allows target switching, but not constantly. Same can be applied to other things, fight or flee? Score both.

    Layering, you can layer AI, lowest level just handles basic task, flying, docking, simple attack. A level above that handles basic logic like picking targets, simple descisions. Above that squad logic, and then fleet logic. (EE only has the basic level, anything above that needs to be scripted)

  • Those are some good points.

    Yeah, visibly cheating is generally very bad. Non-visibly cheating should not be over done either. Some non-visible cheats can be subtly detectable. But good concept.

    Randomness is a waste of a place where the player can figure it out. I think I remember thinking about a concept like that at some point.

    At some point, I would like to have fleet logic. I'd like to implement it more as a captain ship which gives orders to followers rather than a separated brain. It would use the same type of communication as other ship to ship communication, so a player ship could theoretically intercept the communication, and probably make nothing of the encrypted data... but hey maybe comms could say something like "I am picking up a lot of radio chatter between those guys, they must be making a move". I do not even know if that would be practical, but it sounds cool!

    Certainly: abstractions like flying a distance in a direction; Then a pathing travel, which would use that; And maybe a docking logic which would use both at different times.

    We'll see what I come up with, right now I am just trying to get the AI to burn the thrusters the right amount to end up pointing at the player (with acceleration and deceleration)...

Sign In or Register to comment.