May 29, 2010

Clever girl…

The enemies in Telepath RPG: Servants of God are evolving! (Actually, I’m just rewriting their AI code again.) Some clever players have noticed that enemy attacks follow a familiar (and predictable) pattern of priorities, first targeting characters they can kill, then going for characters they can backstab, then going after characters who’ve already taken damage, and then simply attacking anyone they can get their grubby little claws on.

Well, now it’s the enemies’ turn to be clever. Once I’m finished rewriting the AI code, enemies will be less straightforward in their approach to choosing targets. Each enemy will take into account such factors as whether they can kill a character in one attack, whether a character can be finished off by someone else nearby, whether the character is vulnerable to a backstab, whether a character is a psy healer, whether the character is someone the player has to keep alive, whether a character is injured, and how many characters the enemy can hit in one attack. But the really cool thing is, they now take all of these things into account at once.

The new structure of the code may also have a side benefit of improving game performance. (Perhaps less impressive for you, but helpful for me, is the fact that this improved AI code also cuts out several thousand lines of now-unnecessary code from the game.)