Changes between Initial Version and Version 1 of rb


Ignore:
Timestamp:
Jun 14, 2011 3:35:15 PM (14 years ago)
Author:
jpawlick
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rb

    v1 v1  
     1This ProtocolZero query is much like [[rf]], except that it is designed for large-scale image acquisition. Normal [[rf]] returns only one sample per command, and thus a user attempting to get a large number of samples by sending many queries to it at a variety of angles suffers poor performance and risks overflowing the Quagent's command queue. [[rb]] improves upon rf by allowing the user to specify a region of samples with only a single command. High-resolution data can take some time to write: the game will appear to hang while it does. On machine "e33" in the lab, this command can acquire about 250,000 samples per second (so, for example, it takes 2 seconds to get a 720 by 720 area).
     2
     3It is useful to think of [[rb]] as returning a band-interleaved raster. (An image interpretation of such a raster is shown below.)
     4[[image!]]
     5(In the above image, the striped area represents another entity (in this case, a player) in the environment, while the walls are greyscale. White areas are further from the bot, while black areas are close. The uppermost row of the image corresponds to a pitch of 45 degrees up, and the bottom row is 44.5 degrees down. The left side is at -90 yaw from the bot, and the right side at +90.)
     6
     7However, this should not be thought of as returning a picture from the point of view of the bot for the following reasons.
     8 * [[rb]] returns a number of samples generated by accumulating sample_deltas. Increasing YAW makes the bot turn left, so for positive sample_delta_yaw, subsequent samples are more to the left. This is not the standard image coordinate system where increasing samples in the X direction are to the right. In other words, the "image" would be flipped horizontally from what the bot would actually "see".
     9 * [[rb]] generates the image by a process that is suggestive of a fisheye lens, not a linear projection. For example, it is possible to have a raster that contains the results of rays looking directly ahead and behind, an impossible perspective for linear projections. Wall seams will appear curved, etc.
     10
     11'''Parameters:'''
     12 * 1: integer type, selecting the type of rangefinder to use. A "solid" as used below means a wall, floor, ceiling, etc.
     13  * 0 = an infinitely narrow beam that passes through entities such as other quagents but is stopped by solids.
     14  * 1 = an infinitely narrow beam that is blocked by entities and solids.
     15  * 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.
     16  * 3 = a wide beam the size of a quagent that is blocked if any part of it is blocked by solids or entities.
     17 * 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.
     18 * 3: float theta, the number of degrees left of facing to start shooting the rangefinder at.
     19 * 4: float phi, the number of degrees down from facing to start shooting the rangefinder at.
     20 * 5: int width, the width of the returned raster (how many YAW-variant samples to take).
     21 * 6: int height, the height of the returned raster (how many PITCH-variant samples to take).
     22 * 7: float sample_delta_yaw: how far apart (in degrees) two samples differing only in YAW should be.
     23 * 8: float sample_delta_pitch: how far apart (in degrees) two samples differing only in PITCH should be.
     24
     25'''Responds:'''
     26 * ''n X1 E1 X2 E2 X3 E3... Xn En'' where n is the number of samples (width*height) in the raster. Each X is the range at which the rangefinder stopped, and each corresponding E is the entityid of the entity that stopped it (or -1 or -2, see [[rf]]).
     27
     28'''Reports:'''
     29 * ''done'' when the task completes.
     30 * ''popped'' if popped by [[po]].
     31 * ''forgotten'' if deleted by [[fa]].
     32
     33'''Example:'''
     34 * User sends: "n rf 512 1 6000 90 45"
     35 * Bot replies "rs rf 512 65.2 -2"
     36 * Bot replies "cp rf 512 done"