Author Topic: Enemy Pathfinding Question/Issue  (Read 3561 times)

rpc190

  • Posts: 44
  • Map Maker
    • View Profile
Enemy Pathfinding Question/Issue
« on: July 15, 2014, 01:50:07 AM »
I ran into an issue today with enemies trying to fit through smaller openings. When a 2 square (64x64) opening is left the enemies pass through fine as seen in the first screenshot. However if you move the two boxes in even one notch on the smallest grid scale the enemies are reluctant to go through unless herded as seen in screenshot 2. They will happily wait outside if you run inside the closed area even though they could easily fit. I imagine this is because something in the path finding works on a 32x32 scale and considers a space occupied even if it is only partially so? Wondering if this would be a lot of work to change / if you would consider it or if you have a solution.

Screenshot 1: Fine Pathing


Screenshot 2: Enemies Sleeping

Hipshot

  • Developer
  • Posts: 453
  • Level Designer
    • View Profile
Re: Enemy Pathfinding Question/Issue
« Reply #1 on: July 15, 2014, 06:39:28 AM »
You can see the path finding if you type shownavigation in the console, if you play using the dev version.

« Last Edit: July 15, 2014, 09:14:24 AM by Hipshot »

CrusaderDeleters

  • Posts: 102
  • The Great Crusader
    • View Profile
Re: Enemy Pathfinding Question/Issue
« Reply #2 on: July 17, 2014, 01:57:53 PM »
As I thought. He uses a grid system to see which blocks the enemy can go through. :)
The King of Maernol

shiftyBOT

  • Posts: 44
  • KlokWorkz main artist and level designer.
    • View Profile
Indeed!
« Reply #3 on: July 17, 2014, 05:47:10 PM »
Hello again :P
I've been lurking on this thread:D
and you would assume the enemy AI work on a grid system.
and I have a decent question.
would the enemy AI have any trouble if wall wernt the normal straight design?
(sorry for no picture, i have no way to share one, other than through steam but that would be a spoiler of the very closed pre pre alpha of my current map):D

EDIT: ~shiftyBOT(i used the wrong account name, :P
(also does anyone mind if i do a text signiture?)
« Last Edit: July 17, 2014, 05:50:20 PM by shiftyBOT »

CrusaderDeleters

  • Posts: 102
  • The Great Crusader
    • View Profile
Re: Enemy Pathfinding Question/Issue
« Reply #4 on: July 19, 2014, 01:23:32 AM »
Hello again :P
I've been lurking on this thread:D
and you would assume the enemy AI work on a grid system.
and I have a decent question.
would the enemy AI have any trouble if wall wernt the normal straight design?
(sorry for no picture, i have no way to share one, other than through steam but that would be a spoiler of the very closed pre pre alpha of my current map):D

EDIT: ~shiftyBOT(i used the wrong account name, :P
(also does anyone mind if i do a text signiture?)
You mean a wedge-shaped wall section? Pretty sure that would screw it up. If you keep 2 spaces between each walling section, you should be able to make a snake path, which the AI /might/ go simply diagonally.
The King of Maernol

shiftyBOT

  • Posts: 44
  • KlokWorkz main artist and level designer.
    • View Profile
Re: Enemy Pathfinding Question/Issue
« Reply #5 on: July 19, 2014, 04:15:34 AM »
ok :P

thats the answer i expected:/
just didnt know if some wierd thing would happen.