project-navigation
Personal tools

Author Topic: pathfinding through gaps  (Read 3964 times)

Offline blondandy

  • Sergeant
  • *****
  • Posts: 391
    • View Profile
pathfinding through gaps
« on: July 08, 2007, 09:41:51 am »
according to this
http://ufoai.ninex.info/wiki/index.php/Mapping_For_Dummies/Lesson1
human-controlled actors can get through gaps of size 32 and aliens/civvies can get through gaps of 24.

to test pathfinding for human-controlled actors i have been force-starting multiplayer 1on1. this lets me take my guys around with no one shooting at them, so i can investigate pathfinding.

is there any way to do something similar to investigate pathfinding for aliens?

this
http://ufoai.ninex.info/wiki/index.php/Mapping/Dimensions
has no mention of differences in pathfinding for humans and aliens.

I have observed maps
http://sourceforge.net/tracker/index.php?func=detail&aid=1710822&group_id=157793&atid=805242
where there are differences in pathfinding for humans and aliens.

this post has become rather long and rambling: symptomatic of my confusion, i fear.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
pathfinding through gaps
« Reply #1 on: July 08, 2007, 09:55:27 am »
there are no differences between alien and soldier pathfinding. sorry. The underlying pathfinding data is for every entity the same.

btw. you can start the map via devmap <mapname> to test pathfinding.

Wanderer

  • Guest
Re: pathfinding through gaps
« Reply #2 on: July 10, 2007, 06:37:00 pm »
Quote from: "blondandy"
according to this
http://ufoai.ninex.info/wiki/index.php/Mapping_For_Dummies/Lesson1
human-controlled actors can get through gaps of size 32 and aliens/civvies can get through gaps of 24.


Andy, that's a paraphrase of the problem.  I'll make sure the wiki isn't saying this, as it's inaccurate.

[EDIT]: The wiki states:
Quote
NOTE: An NPC or Alien CAN walk through any 24x24 space available to it (I've tested it as of Version 2.1), however, you cannot actively place a player there unless the 32x32 grid lines up properly. This means unless you're intending to give a huge positional advantage to the NPCs, do NOT stray from making sure your 'walking areas' are in the correct 32x32 locations.


Please note, I do not state there is a difference in the pathfinding, I state there is a difference in selectable stopping points.
[/EDIT]

Both sets (Human controlled and AI) of maneuvering can move through a smaller area, IF IT IS WIDE ENOUGH because of an overhang into another '32x32' square.  However, the human cannot CHOOSE to end in that square, because the interface blocks it, appropriately.

Picture this:

Code: [Select]

Normal Walk:
0                   32

|    <-32->         |
|                   |
|                   |

Twisted Walk
0         16       32        48
|                   |
     |                   |
|                   |


The first is the 'standard' and proper build method, the walls line up on the 32 lines, and you can obviously see where you're going.

In the second (shown in very simple), a human can *choose* to stop on the first or third line, but not the second.  However, you can get to the second by choosing past the location, and then having the pathing stop you in this position.  This is because the model can *fit* into the space, however, it is not a selectable stopping point.

To be able to perform your own tests, do the following:  Setup a Maze like map at level 1, with walls going to level 2 (0-64).  Make sure these walls both ride along standard lines (32) and make some that are in between.  At a high Z, insert observation booths around the edges and put in a bunch of Civilians so they can watch the aliens through windows (You might also set their floors as windows).  Put alien (or more civilian) starts in the bottom, and watch the behavior.

Wanderer

  • Guest
pathfinding through gaps
« Reply #3 on: July 10, 2007, 11:05:05 pm »
I didn't want to edit the same post repeatedly, but something to keep in mind.  I mention 24x24 spaces because even though the walking area is selected in 32x32 boxes, walls 4 boxes wide can fill in a box on every side, making the actual space a model uses (32-8 )x(32-8 ), or 24x24.