home *** CD-ROM | disk | FTP | other *** search
/ Hráč 1998 February / Hrac_18_1998-02_cd.bin / DEMA / BZone / bzondemo.exe / data / Collision.cfg < prev    next >
Text File  |  1998-01-19  |  4KB  |  116 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Collision.cfg
  4. //
  5. // This files contains runtime configuration variables for collision avoidance.
  6. //
  7. // By the Mad Dr. I
  8. //
  9. ///////////////////////////////////////////////////////////////////////////////
  10.  
  11. // Which revision of this file are we using?
  12. #define COLLISION_CONFIG_FILE_REVISION 1
  13.  
  14. // Range Search Parameters
  15. #define AVOIDANCE_USING_RANGE_SEARCH 1
  16.  
  17. // How big is a grid cell in the range search structure?
  18. #define GRID_X_SIZE 256.0
  19. #define GRID_Z_SIZE 256.0
  20.  
  21. // Which modes are on?
  22. // Any or all of the following four modes can be selected or deselected
  23. // together.
  24. // The combo most like the old avoidance is (1,0,0,0).
  25. // The one recommended by the doctor is (1,1,1,0)
  26.  
  27. // COLLISION_DIRECT_REPULSION is a repulsive force pointing directly
  28. // at one object from another.
  29. #define COLLISION_DIRECT_REPULSION 1
  30.  
  31. // COLLISION_LATERAL_REPULSION is a force which causes one object to move
  32. // laterally to take another object out of its direct path.  This keeps two
  33. // objects from being is a "standoff" facing each other trying to get by.
  34. #define COLLISION_LATERAL_REPULSION 1
  35.  
  36. // COLLISION_FULL_POTENTIAL_FIELD uses forces from all really close objects 
  37. // if its value is 1.  Otherwise, the repulsion is only from the single
  38. // closest obstacle.  This makes a noticable difference when several objects
  39. // are close together (cuts down collisions)
  40. #define COLLISION_FULL_POTENTIAL_FIELD 1
  41.  
  42. // COLLISION_REAL_COLLISIONS turns on a check (when 1) to see if two objects
  43. // really could collide given their current velocities.  If not, forces are
  44. // nott applied.  This is potentially expensive, and the parameters would need
  45. // to be tweaked carefully to avoid collisions.
  46. #define COLLISION_REAL_COLLISIONS 1
  47.  
  48. ///////////////////////////////////////////////////////////////////////////////
  49. // FOR Lateral Repulsion
  50.  
  51. // This is a modifier for the magnitude of lateral 
  52. // forces applied for avoidance
  53. #define LATERAL_AVOIDANCE_MULTIPLIER 120.0
  54.  
  55. // This is how many times bigger the danger zone for a collision
  56. // can be than the combined radius of the two objects
  57. #define LATERAL_DANGER_WIDTH 1.0
  58.  
  59.  
  60. ///////////////////////////////////////////////////////////////////////////////
  61. // FOR AIUtil_Detect_2D_Collision
  62.  
  63. // When we're looking to see if there will be a collision with an object
  64. // in some time period, what is the time we say (in seconds)
  65. #define COLLISION_LOOK_AHEAD_TIME 2.5
  66.  
  67. // When doing the Real Collision Look ahead, how much bigger than the
  68. // real radius of objects do we consider the objects to be...
  69. #define COLLISION_SAFETY_COEFF 1.2
  70.  
  71. ///////////////////////////////////////////////////////////////////////////////
  72. // FOR FindPotentialField
  73.  
  74. // How much more attractive is the final goal than a waypoint?
  75. #define EXTRA_GOAL_ATTRACTION 4.0
  76.  
  77. // Simple multiplier for the effect of repulsion
  78. #define REPULSIVE_COEFFICIENT 1600.0
  79.  
  80. // Simple multiplier for effect of attraction
  81. #define ATTRACTIVE_COEFFICIENT 1.0
  82.  
  83. // By default how far away do we cut off the repulsive effect of an object
  84. // (in meters)
  85. #define DEFAULT_REPULSION_CUTOFF 40.0
  86.  
  87. // Default distance for potential field influence of repulsion
  88. #define DISTANCE_OF_INFLUENCE 30.0
  89.  
  90. ///////////////////////////////////////////////////////////////////////////////
  91. // FOR CliffForce
  92.  
  93. // Additional coefficient for cliffs' repulsive force
  94. #define CLIFF_REPULSION_COEFFICIENT 3.0
  95.  
  96. ///////////////////////////////////////////////////////////////////////////////
  97. // FOR GotoTask::Goto(void)
  98.  
  99. // How close to a point on our path should we be before we start heading to
  100. // the next point
  101. #define SWITCH_TO_NEXT_POINT_DISTANCE 10.0
  102.  
  103. ///////////////////////////////////////////////////////////////////////////////
  104. // FOR UnitTask::IsStuck(void)
  105.  
  106. // Give some extra time before we call a unit stuck!
  107. #define EXTRA_STUCK_TIME 5.0
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.