Posts Tagged "AI"

Update on the dungeon code

Following up on the work on Dungeon Escape (name pending, sounds a little too generic and there’s a few ones with that name around) I’ve further developed the dynamic pathing and AI aspects, which actually work very close together.

The dynamic pathing is just a series of custom dummy actors (imagine something like a Note actor) which I can place in the editor and spawn at runtime. Besides that all of the pathing is done by the AIController by using traces to check if such a DynamicPathNode is available to walk to.
With this I’ve developed a patrolling routine that makes the AI control the Pawn to navigate between available DynamicPathNodes and prioritizes them to decide where to go next (usually driven to the right but also takes into account unvisited Nodes and a few extra stuff to make sure it doesn’t go on weird loops or leave places without visiting). In general it works quite well and it doesn’t eat too much resources. In addition it also detects when it reaches a dead end and once he does he will turn back around a rest for a few seconds before going back to his patrolling; it’s also able to cut corners in a curve to prevent the patrolling from looking stiff, as well as going around other Pawns that might be on the way or totally avoid them if they are also patrolling.

The next feature (here’s a pic) is following the Player.







Read more…