Changes between Version 12 and Version 13 of rb


Ignore:
Timestamp:
Jun 20, 2011 1:14:56 PM (13 years ago)
Author:
jpawlick
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rb

    v12 v13  
    1313'''Parameters:'''
    1414 * 1: integer type, selecting the type of rangefinder to use. A "solid" as used below means a wall, floor, ceiling, etc.
    15   * 0 = an infinitely narrow beam that passes through entities such as other quagents but is stopped by solids.
    16   * 1 = an infinitely narrow beam that is blocked by entities and solids.
    17   * 2 = a wide beam the size of a quagent that is blocked if any part of it is blocked by solids, but passes through entities.
    18   * 3 = a wide beam the size of a quagent that is blocked if any part of it is blocked by solids or entities.
     15  * 0 = an infinitely narrow beam that is only stopped by permanent surfaces that will stop the player (usually just walls, floors, ceilings, and moving platforms, never other quagents or rockets or powerups).
     16  * 1 = an infinitely narrow beam that is blocked by anything that would block player movement (like mode-0, but plus other things like quagents).
     17  * 2 = an infinitely narrow beam that is blocked by anything that would block a shot (often equivalent to mode 1, but on some levels (like [[Built-In Maps|suspended]]), there are walls/floors that can be shot through but not walked through).
     18  * 3 = an infinitely narrow beam that is blocked by anything in the environment (like mode-1, but plus powerups or other things that can be walked through).
     19  * 4 = a wide beam the size of a quagent that is blocked if any part of it is blocked by something that would block a mode-0 rangefinder.
     20  * 5 = a wide beam the size of a quagent that is blocked if any part of it is blocked by something that would block a mode-1 rangefinder.
     21  * 6 = a wide beam the size of a quagent that is blocked if any part of it is blocked by something that would block a mode-2 rangefinder.
     22  * 7 = a wide beam the size of a quagent that is blocked if any part of it is blocked by something that would block a mode-3 rangefinder.
    1923 * 2: integer distance, the maximum distance of the rangefinder. There is no particular penalty to supplying very large distances that we can find - the maximum distance we've seen this call used with in Quake is 8120, the range of the rail gun.
    2024 * 3: float theta, the number of degrees left of facing to start shooting the rangefinder at.
     
    4044 * Bot replies "cp rb 512 done"
    4145
    42 The following illustrates the difference between a mode 1 and mode 3 rangefinder (mode 0 and 2 are similar, but would not show the other player on the stairs). Both pictures are of the exact same scene, and were gotten by "n rb 0 [MODE] 20000 -180 -90 720 360 .5 .5", where [MODE] was 1 or 3.
    43 [[Image(mode1rao0.png)]]
    44 [[Image(mode3rao0.png)]]
     46The following illustrates the difference between rangefinder modes. Please note that none of the pictures have the exact same scale in terms of white to black. Both pictures, however, are of the exact same scene, and were gotten by "n rb 0 [MODE] 20000 -180 -90 360 180 1 1".
     47|| [[Image(mode0rao0.png)]] || [[Image(mode1rao0.png)]] ||
     48||= Mode 0 =||= Mode 1 =||
     49|| [[Image(mode2rao0.png)]] || [[Image(mode3rao0.png)]] ||
     50||= Mode 2 =||= Mode 3 =||
     51|| [[Image(mode4rao0.png)]] || [[Image(mode5rao0.png)]] ||
     52||= Mode 4 =||= Mode 5 =||
     53|| [[Image(mode6rao0.png)]] || [[Image(mode7rao0.png)]] ||
     54||= Mode 6 =||= Mode 7 =||
    4555
    4656While the first image has more detail, the second image is more useful for navigation - objects appear wider because the Quagent is considering how far it can move before it collides with them. In the second image, a single pixel of room around an obstacle indicates that it can be moved through, whereas the first image does not take into account the bounding box size of the Quagent. (By the way, the scale on the images is independent: there are pixels on the second that are brighter than their counterparts on the first (even though the rangefinder returned a close value) because the way I drew these was to just put white at maximum distance and black at minimum, and the second image has a narrower range of values.)