Changes between Initial Version and Version 1 of vc


Ignore:
Timestamp:
Aug 18, 2011 2:45:01 PM (13 years ago)
Author:
jpawlick
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • vc

    v1 v1  
     1This ProtocolZero query uses the graphical abilities of Quake 3 to render the world as seen from the bot's perspective. Unlike [[rb]], this uses a linear projection to produce an image much like the ones the player sees while playing the game.
     2
     3Currently, drawing of the first-person gun and of two-dimensional overlays (such as ammo counts, health meters, reticule, name displays, score displays, and so forth) is disabled under most conditions.
     4
     5[[vc]] requires graphics acceleration and so cannot be used on a dedicated server. Any graphics options (such as image resolution, texture detail, and so forth) will match the options of the client that is running as host.
     6
     7Performance will rely on your graphics hardware. Due to the nature of accelerated drawing surfaces, if part of the Quake 3 window is obscured by another window while the system conducts a [[vc]] or [[vd]] command, that portion of the resulting image is undefined.
     8
     9It is not uncommon to notice a hiccup in Quake's performance while a [[vc]] operation is being undertaken. This is usually because of the socket transfer time rather than the drawing time.
     10
     11FIXME: A disconnection or the client's refusal to read can cause Quake to hang indefinitely as it waits to complete the sending of the image data. See the comment in Trap_Com_QuagentsGLGetView in code/qcommon/common.c.
     12
     13'''Parameters:'''
     14None.
     15
     16'''Responds:'''
     17 * ''w h DATA'' where w is the width of the image, h is the height of the image, and DATA is w*h*3 bytes of color information. The first three bytes define the red, green, and blue values (in that order) of the first pixel in the buffer (lower left corner of the image). The next three belong to the pixel immediately right of that pixel, and so on (row major order).
     18
     19'''Reports:'''
     20 * ''done'' when the task completes.
     21 * ''popped'' if popped by [[po]].
     22 * ''forgotten'' if deleted by [[fa]] or [[fm]].
     23 * ''replaced'' if replaced by a command scheduled with 'r'.
     24
     25'''Example:'''
     26 * User sends: "n vc 512"
     27 * Bot replies "rs vc 512 640 480 5q'5hn?o1qin716[32\-..."
     28 * Bot replies "cp rb 512 done"
     29
     30The following images demonstrate the relationship between [[vc]] and [[vd]]. Note that [[vd]] does not really return an "image", but its returned raster has been visualized as an image below.
     31
     32If you experience color cycling (it seems like the red component is where you expect the blue, and so on), make sure you are reading the space from the socket before you start reading image data.