home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 04 Pathfinding and Movement / 05 Hancock / ReadMe.txt < prev   
Encoding:
Text File  |  2001-09-17  |  2.3 KB  |  50 lines

  1.  
  2. This is a skeleton of the code necessary to implement some of the
  3. ideas presented in the article:
  4.  
  5. "Navigating Doors, Elevators, Ledges and Other Obstacles." 
  6.  
  7. Author: John A. Hancock
  8.  
  9.  
  10. Since the entire navigation system depends on many subsystems which
  11. I could not include here, not all of the code provided will compile
  12. unless at least stub functions are provided for some calls. Nevertheless,
  13. the code should provide a good starting point for your own implementations
  14. of versatile navigation code.
  15.  
  16. NodeAndLink.h and NodeAndLink.cpp include a basic implementation
  17. of the PathNode and PathLink classes that make up the nodemap.
  18. If memory is tight, some of the class members used for annotation
  19. or path-planning (such as the std::string name, the elevatorFloor,
  20. and the mutable pathfinding members) should be separated from the
  21. essential members.
  22.  
  23. ExtractRegions.cpp provides the functions necessary to implement
  24. the connected component extraction outlined towards the end of the article.
  25. NodeMap::ExtractRegions is the master function which generates 4 types of
  26. regions for each node. GenerateRegions labels all the nodes with the
  27. proper region type based on one-way and connectivity predicate function
  28. objects and adds one-way links to a list. GenerateRegionConnectivity uses
  29. the one-way links to fill in the region connectivity matrix that describes
  30. which regions are reachable from other regions.
  31.  
  32. Goal.h and Goal.cpp include the code for the basic Goal and GoalQueue classes.
  33. The goal queue is implemented as an Standard Template Library (STL) list.
  34.  
  35. Goal_FollowLink.h and .cpp illustrate the basics of following an individual
  36. link. The types of links used will likely depend on the type of game, and
  37. code for full implementations will depend on a variety of subsystems.
  38.  
  39. Goal_GotoNode.h and Goal_GotoNode.cpp are the goals that generate most of
  40. the path-planning requests. Goal_GotoNode calls the AI function
  41. GeneratePathingGoals() which requests an A* search of the nodemap and
  42. GenerateGoalsFromPath() turns the A* path into a series of goals. See
  43. GenerateGoals.cpp for these functions.
  44.  
  45. Goal_GoThroughDoor.h and .cpp, Goal_RideElevator.h and .cpp, and
  46. Goal_HitSwitch.h and .cpp implement basic goals for navigating through
  47. doors and elevators.
  48.  
  49.  
  50.