Teaching a potato to think - A.I Update #3

I wanted to include a video with this update, but Fraps doesn't handle Game Maker very well :C Ah shucks.

Anyway, today I tore apart (not really, more just pulled apart) the enemy A.I and started to rework it. Basically, it overlapped too much, and that was causing problems. Now I'm going through system by system, making all the necessary changes.

Firstly, and arguable quite importantly, was making the A.I turn to face the player, rather than snapping. It's a simple thing on paper, but it's more difficult than it sounds. Remember that 0" and 360" are the same, and that to a computer the fastest route from 5" to 355" is to add rather than subtract. That one was a bugger to solve.

Next, I made sure the enemy only turned when he could see the player, and only within a certain cone. If you stand in his periphery, he will see you, but if you're out of sight he'll be oblivious. When oblivious, he'll either fidget (change direction occasionally) or patrol (still working on that).

Patrolling is my next task. It's not the patrol that's hard, it's the entry/exit. I need to tell the A.I what to do when it needs to break off it's path, and then how to return to it. It's not as straightforward as it sounds.

Oh, yeah, it shoots fine too. I forgot about that.

So patrolling is next, and once that's all sorted I'll add back in the cover mechanic, and the chase logic. Those will definitely be separate entries, due to their inherent complexity.

On another note, I've also been noodling in regards to narrative and theme. So, because I can't represent the A.I in a static picture and Fraps is playing up, here's a mood picture;

Equilibrium is a fairly big influence, thematically.
-Rob

Comments

Popular posts from this blog

A productive day!

Tile Bleed & Looking at Art Style (Again)

Moveset Expansion (and controller support!)