Announcement

Collapse
No announcement yet.

PatrolPoints, PathNodes, and Doors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PatrolPoints, PathNodes, and Doors

    Okay, I've started experimenting with AI. Here's some questions:

    1) If I set up a series of Th-Patrolpoints in a building, lets say, following a path down a hall through some rooms, etc, how do I get the guard to follow the exact same route back using the minimum number of Th-Patrolpoints? To clarify:

    The Route will be from 'A' to 'B' to 'C' to 'D' to 'E'. When my guard reaches 'E' pp, must I create another series of pp's with different tags going back along the exact same path, ie: 'E2' to 'D2' to 'C2' to 'B2' to his start position of 'A2' ? or is there some way of perhaps assigning the event at 'E' pp an 'A' and then will the guard follow some undetermined, random route back to its starting point? Again, I wish to have some of my guards following strict Patrols through my map following the same paths they've traversed previously. It's a question of # of Th-Patrol points primarily.

    2) Is it possible to overdo the # of pp's on ones map? Or Pathnodes? What effect would result from such a practice?

    3) Is it necessary to have pathnodes in the same places there are Th-Patrolpoints? Can pp's serve the same function as pathnodes, alone?

    4) Would I need to perhaps create a 'NewOrders' set and tag for a guard to return along a previously trodden route in 'reverse order' ?

    5) Do AI Guards choose random pathnodes at unpredictable times and is it possible to keep them strictly and completely under your control or is there an element of chaos programmed into their behaviour? (I realise that once human players distract the Ai's there will be unpredictability, but prior to human intervention, and, after they have 'calmed down and returned to their duties/routines', is my prior concern right now.)

    6) If I don't want an AI guard to take an undesirable path, would adding more Th-Patrolpoints or closely placed pathnodes, keep AI guards along a strict path of my choosing, thereby not choosing nearby alternate pathnodes which might tempt it ?

    And a brief question on Th-Doors:

    1) Should a Th-Door/mover brush be flush up against the walls of the holes or spaces they are placed in? Would placing a Mover that was just slightly smaller than the opening by say 1 or 2 uu's make the mover less susceptible to BSP problems? I'm finding one of my movers is causing a BSP problem. At least I think thats what is causing it cause when I remove the mover the 'Hole' goes away. Sometimes I find if I don't allow a mover or semisolid to touch anything around it I don't get these blasted BSP's,....sometimes.... (I also realise this may cause light leakage through the 'cracks' between the doors and their frames.)
    ...and all is silent, save the voice of the clock...

  • #2
    Wheeeeeeeee! This is where I shine!

    A bot will always take the shortest path from his current destination to his goal - they do not have any special code to pick alternate routes. As he reaches each node, he'll then pick the shortest path to the next node. A bit of forethought will usually reduce your nodes somewhat, e.g. if you have a PP at position A and a PP at position C and you want the bot to pass through position B, but he's taking another undesired route, then you should place a PP at or near potition B.

    1) You'd need to create a duplicate (but reversed) path back to the initial patrol point to get this to work.

    2&3) Having lots of PPs is fine, there's no great problem with that. PPs do act as pathnodes however, and lots of unecessary pathnodes can really slow down the path building in UEd and the actual gameplay itself.

    4) There are no orders to make a bot retrace his path in reverse order, though the feature will be in the next version of Thievery after 1.3. All you can do for now is make your routes 'loop', i.e. make the last PP point back to the first one.

    5) Bots always choose the shortest path, however if they cannot find a path to their goal, they will sometimes roam about randomly. There's information here on debugging your path networks.

    6) Once again, bots always take the shortest path. Read this doc about UT AI, specifically the section titled 'The Navigation Network', for tips on good pathing.
    AI Programmer,
    Thievery UT

    Comment


    • #3
      Wow... that's a lot of shining 8)

      Comment


      • #4
        Thankyou, ElJoelio, much appreciated.

        If I understand you correctly then, I can safely reduce my pathnode count and the pp's will safely act in the same way as pathnodes for other AI guards who happen to be for instance led off course by disruptive humans then? So is there really any need for pathnodes at all? I've heard that for sound to travel properly from a particular source, it needs to follow pathnodes - yet even though I've pathnoded large parts of my map the sounds seem to be heard almost in every direction and through walls too.
        At present my map has multi-levels: occasionally I'm finding my bots trying to; 1) walk off cliffs (mostly they don't succeed, but one in particular loves to commit suicide. ), 2) Walk off raised platforms when his patrol orders forbade him to. :roll: 3) Change their routes and adopt other guards routes - very strange. In some cases I've even had AI's walk into areas that aren't even noded or pp'ted!! (Maybe lower or higher pathnodes somehow interfere with the AI's sense of direction, is this possible? Do pathnodes and pp's work vertically ? The coloured lines connecting the nodes seem to not connect vertically from what I've seen. I'm sure once I've implemented what you've said previously, and what was in that article on debugging, that these things will correct themselves.

        Much obliged.
        ...and all is silent, save the voice of the clock...

        Comment


        • #5
          my (incomplete) map doesn't have a single pathnode but alerted ais will wander around. They only stick to the pathnoded sections when wandering - if they want to get to something in an area that isn't pathed they still try to.

          I'm sure Joel can explain the whys and wherefores of how they do it but I do know that they just do...
          One of the three LANers of the Apocalypse!
          -
          The Unforgiven Casual Gaming Group - New Members Welcome

          Comment


          • #6
            Originally posted by Chainsaws
            my (incomplete) map doesn't have a single pathnode but alerted ais will wander around. They only stick to the pathnoded sections when wandering - if they want to get to something in an area that isn't pathed they still try to.

            I'm sure Joel can explain the whys and wherefores of how they do it but I do know that they just do...
            It's kinda like... walking in the dark i think...

            Comment


            • #7
              TPatrolPoints are a superset of PathNode, in that they have all the functionality of PathNodes, but also have extra TPatrolPoint-specific information attached to them.

              You can populate your entire level with PPs and they will work fine, but the extra overhead will increase your map size and possibly affect performance. Therefore you should use normal PathNodes to populate your map, and then place PPs at positions you want your bots to patrol. If a PP overlaps with a PathNode already there, delete the PathNode as it is not necessary.

              Bots use PathNodes to get to their destination, but only if the destination is not directly reachable by moving in a straight line. If there is no direct path, the bot will try to find a nearby pathnode, and will use that pathnode to perform a search to find the list of pathnodes to travel to in order to reach his desired destination. If no path can be found, the bot will fall back to wandering in random directions.

              PathNodes do not work vertically, unless they are 'jump down' pathnodes that tell bots they can jump off a cliff to reach the next node. The bots have code to stop them doing this tho, so I'm not sure why yours are suicidal.

              The sound system does use pathnodes to trace sound propagation, which works well sometimes and not so well at others.

              Open up one of the Thievery maps (preferably TH-Spider, because it has PERFECTO pathnoding) and have a look at how nodes should be used.

              I sleep now...
              AI Programmer,
              Thievery UT

              Comment


              • #8
                (....I didn't realize this post had been resurrected...)


                To ElJolio:

                ...actually, it was only one of my bots that liked to commit suicide - and only after struggling hard did his determination pay off. :roll: Thanks to your article I've figured out where I was going wrong, I think. Also, the sound problem was due to adjusting the wrong sound controls.

                Thanks again!
                ...and all is silent, save the voice of the clock...

                Comment

                Working...
                X