Sunday, October 9, 2011

AI routine.. bug found..

Hello,


After making good progress in combat and other AI and skill related stuff I noticed disturbing thing in my TimeEngine and AI routine.. It seems current system can't handle instant stuff, it always takes at least one turn to make  stuff happen. It wasn't obvious when I implemented the system and tried it with walking because the AI decision was made on first turn and didn't change after that - thus no delay on NPC brainactivity... Now that I need NPC to make fast decisions based on if player attacks or flees, it takes one round npc to discover that player had fled or on the other side, it takes one extra round for npc to attack.

I need to fix this by making TimeEngine not responsible of calling AI routines but just keeping track how much every NPC gonna get action points based on what player has used. Monsters should do their own AI calling. Im not sure if TimeEngine gonna get more authority but we will see once I start implementing new system.

On the plus side its good that I noticed this bug now.. It would have been pain to fix later on.

No comments:

Post a Comment