The enemy AI checks all the places it can go to in order to work out the best one. This lead to some nice complex behaviour with a relatively simple system. Because they don't have a specific goal in mind it didn't make much sense to use pathfinding algorithms for them. But then I had some situations where checking more than one turn in advance was required due to blocked hexes. I've implemented a little system where it checks a few turns ahead for certain things and it seems to be working.
Here you can see the enemy ship avoids my rather obvious trap!
No comments:
Post a Comment