home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / bbs / misc / 690 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  11.9 KB

  1. Path: sparky!uunet!cs.utexas.edu!gateway
  2. From: s3007048@mackay.mpce.mq.edu.au
  3. Newsgroups: comp.bbs.misc
  4. Subject: GRIP v2
  5. Date: 26 Aug 1992 23:41:28 -0500
  6. Organization: UTexas Mail-to-News Gateway
  7. Lines: 292
  8. Sender: daemon@cs.utexas.edu
  9. Message-ID: <9208270434.AA24699@mackay.mpce.mq.edu.au>
  10. NNTP-Posting-Host: cs.utexas.edu
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                ........................................
  18.                ...__________________________________...
  19.                ../__________________________________\..
  20.                ../____/~~~~\/~~~~~\/~~~~\/~~~~~\____\..
  21.                ../___/~~\/~~V~~\/~~\/~~\_/~~\/~~\___\..
  22.                ../___/~~\___/~~\/~~\/~~\_/~~\/~~\___\..
  23.                ../___/~~V~~~V~~~~~\_/~~\_/~~~~~~\___\..
  24.                ../___/~~\/~~V~~\/~~\/~~\_/~~\_______\..
  25.                ../___/~~\/~~V~~\/~~\/~~\_/~~\_______\..
  26.                ../____/~~~~\/~~\/~~V~~~~\/~~\_______\..
  27.                ../__________________________________\..
  28.                ../                                  \..
  29.                ........................................
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.                Graphical Rendition Interchange Protocol
  48.  
  49.                          format specifications
  50.  
  51.                                Version 2
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                         devised by Michael Glew
  69.  
  70.                             2nd August 1992
  71. -----------------------------------------------------------------------
  72.                             AN INTRODUCTION
  73. -----------------------------------------------------------------------
  74.  
  75.      Over  the years,  I  have  used  many  BBS's and  have encountered
  76. interesting  protocols such  as AVATAR  and SKYPIX.  As I was extremely
  77. interested  with SKYPIX,  I wondered  if it  was possible  to create  a
  78. multimedia graphics protocol that  would be  flexible and simple enough
  79. to be used  on all  machines, yet  is powerful  enough to  create great
  80. looking graphics  screens on  BBS's,  on  any resolution  screen;  from
  81. block character graphics (160x50) to SVGA (1024x850)?!
  82.  
  83.      The transfering of full  bit map  raster files over networks was a
  84. bit stupid  with non-digital  phone lines,  where a  picture could take
  85. anything from 60  seconds to  10 minutes  to transfer  to your machine,
  86. even if  it is  compressed with  MNP or  GIF protocols.   I decided  to
  87. leave  this  to  other  protocols,   and  just  handle  simple  graphic
  88. commands.
  89.  
  90.      The commands are meant to be  part of an ASCII file, much like how
  91. ANSI is  implemented.  A  double escape  (<ESC><ESC>) signals the start
  92. of GRIP mode, and  continues  until  another double  escape is reached.
  93. Each graphic command is followed  immediately by a carriage return, and
  94. line feeds  and spaces  are ignored.   The commands  are meant  to look
  95. like a script, so that editing is simplified.
  96.  
  97.      One  thing must  be  noted  though;   This  protocol is  character
  98. orientated.  That is to say that  the resolution on a 80x25 text screen
  99. is 80x25 - this is to  make formatting  menus and the such easier.  The
  100. line, though will be of the  resolution of the graphics capabilities of
  101. the screen  used.  eg.   if  a  CGA 320x200  screen is  used, then  the
  102. matrix resolution will  be 40x25,  but the  lines will be drawn up to a
  103. resolution  of  320x200,  as  will  circles  and  area  fill  patterns.
  104. Speaking of fill  patterns, as  most machines  will have  8x8 character
  105. matrices, then  that will  be the  base pattern  matrix, so on machines
  106. that have  say a  16x16  character  matrix,  will  have 4  matrices per
  107. character, or twice the resolution.
  108.  
  109.      In Version 1  of the  specifications,  there was the ability to
  110. control the  resolution  directly  using the  protocol.  I decided this
  111. would be a bad idea, so  this has  been removed.  The terminal software
  112. will take  the  default  80x25  screen  data  as  input and  optionally
  113. translate  it to  whatever size  screen  it  currently has.   eg.  If A
  114. 80x32 screen  is used  (on Amiga  PAL  machines),  then say  a C15;16;5
  115. command can be interpreted  as a  C15;20;5 command, hence the aspect of
  116. the entire screen  can be  preserved.   Please  note that  the software
  117. will have to handle correct circle  aspects itself.  Either by hardware
  118. checking, or by user default settings.
  119. -----------------------------------------------------------------------
  120.                         T H E   C O M M A N D S
  121. -----------------------------------------------------------------------
  122.  
  123. NB:  variables in the form a,b represent coordinates (x,y)
  124.      up arrows (^) point to the set of variables that can be repeated
  125.  
  126. -----------------------------------------------------------------------
  127.  
  128.        Name:   Vector
  129. Description:   Draw line(s), join the given points with line vectors
  130.   Variables:   a,b = point
  131.       Usage:   Va;b
  132.     Repeats:    ^^^
  133.     Example:   V0;0;10;10;30;10;0;0
  134.       Notes:   - a and b will be of type BYTE
  135.                - this command will  move to  the first coordinate if no
  136.                current coordinate is  defined, and  draw a line to each
  137.                following  coordinate, updating  the current  coordinate
  138.                at each step:
  139.  
  140.                eg.   move(0,0)      ; move to (0,0) - only if undefined
  141.                      line(0,0)      ; draw to (0,0)
  142.                      line(10,10)    ; draw to (10,10)
  143.                                     ; move to (10,10)
  144.                      line(30,10)    ; draw to (30,10)
  145.                                     ; move to (30,10)
  146.                      line(0,0)      ; draw to (0,0)
  147.                                     ; move to (0,0)
  148.  
  149.  
  150.        Name:   Circle
  151. Description:   Draw circle(s) in current foreground colour
  152.   Variables:   a,b  = centre
  153.                r    = radius
  154.       Usage:   Ca;b;r
  155.     Repeats:    ^^^^^
  156.     Example:   C10;20;5;10;40;3
  157.       Notes:   - a, b and r will be of type BYTE
  158.                - this command  will simply  draw circles  as described,
  159.                but applications  will  either  adjust circle  aspect to
  160.                appear  1:1, or  the aspect  will be  adjustable by  the
  161.                user.
  162.  
  163.  
  164.        Name:   Box
  165. Description:   Draw box(es) in current foreground colour
  166.   Variables:   a,b  = top-left corner
  167.                c,d  = bottom-right corner
  168.       Usage:   Ba;b;c;d
  169.     Repeats:    ^^^^^^^
  170.     Example:   B0;0;10;10;3;3;7;7
  171.       Notes:   - a, b, c and d will be of type BYTE
  172.                - this command could  hand values to the Vector command,
  173.                as this could share code,  and make things simpler.  But
  174.                if the  application machine  has  kernal  routines to do
  175.                this,  you should  use these  routines, as  they will be
  176.                faster.   (Not that  it would  make a  difference at low
  177.                baud rates.)
  178.        Name:   Fill
  179. Description:   Fill enclosed area(s) with current colours
  180.   Variables:   a,b  = starting point
  181.       Usage:   Fa;b
  182.     Repeats:    ^^^
  183.     Example:   F20;10;1;27
  184.       Notes:   - a and b will be of type BYTE
  185.                - there should  be  kernal  routines to  handle this  on
  186.                most  graphics  orientated   machines,  write  your  own
  187.                otherwise.
  188.                - the enclosure  of the  Fill can  be any colour but the
  189.                background colour
  190.  
  191.  
  192.        Name:   Thick
  193. Description:   Set drawing thickness
  194.   Variables:   a    = thickness as a percentage of character width
  195.       Usage:   Ta
  196.     Repeats:   none
  197.     Example:   T30
  198.       Notes:   - a will be of type BYTE
  199.                - eg. T30  will give  30% character  width, which  on an
  200.                8x8 character,  is 2.4  pixels.  Most routines should be
  201.                able  to work  with non-integer  Thickness, for  maximum
  202.                quality.  Please  note  that  routines should  work with
  203.                round "pens":
  204.  
  205.                eg.  1 pixel thickness                       *
  206.  
  207.                     2 pixel thickness                       **
  208.                                                             **
  209.  
  210.                     3 pixel thickness                       ***
  211.                                                             ***
  212.                                                             ***
  213.  
  214.                     4 pixel thickness                        **
  215.                                                             ****
  216.                                                             ****
  217.                                                              **
  218.  
  219.                The routine to define  the "pen"  should use pixels more
  220.                than 50% filled  by a  perfect, adjusted  aspect, circle
  221.                with a diameter that of the thickness value.
  222.  
  223.  
  224.        Name:   Pattern
  225. Description:   Set the fill pattern
  226.   Variables:   a0..a7    = 8x8 matrix bits grouped in to bytes
  227.       Usage:   Pa
  228.     Repeats:    ^ (up to 8 bytes)
  229.     Example:   P85;170 (equivalent to P85;170;85;170;85;170;85;170)
  230.       Notes:   - a is of type BYTE
  231.                - default value is 255
  232.  
  233.  
  234.        Name:   SetPen
  235. Description:   set the Foreground and Background colours
  236.   Variables:   f    = foreground colour (drawing)
  237.                b    = background colour (fill and clear)
  238.       Usage:   Sf;b
  239.     Repeats:   none
  240.     Example:   S4;2
  241.       Notes:   - f and b are of type BYTE
  242.                - works  with  standard  ANSI   colours  (16),  upper  8
  243.                converted to lower 8 if only 8 colours available.
  244.        Name:   Comment
  245. Description:   Allows commenting of GRIP commands
  246.   Variables:   a$   = comment text
  247.       Usage:   *a$
  248.     Repeats:   none
  249.     Example:   * This menu was written by Joe Bloggs 2001
  250.       Notes:   - These should be ignored  by the  GRIP interpreter, and
  251.                ideally, they should  be chopped from the sent GRIP text
  252.                file, by the sending software.
  253. -----------------------------------------------------------------------
  254.                              IN CONCLUSION
  255. -----------------------------------------------------------------------
  256.  
  257.      So there are the  basic commands,  but no  doubt there may be more
  258. to come,  such as  heading text  writers and  the such,  and maybe even
  259. sound will be added - lets wait and see!!!
  260.  
  261.      Outside this protocol,  ANSI and  indeed AVATAR can be used as per
  262. normal.  Carriage Returns may be  ignored if at the start of a command,
  263. eg. if there are two carriage returns  after a command, then the second
  264. one will be ignored - this helps  with formatting  your GRIP text file.
  265. But most GRIP sensitive  BBS packages  will filter  out comments to get
  266. the most efficient output from the serial connection.
  267.  
  268.      It is entirely  optional, but  the fill  styles will  apply to 1:1
  269. pixel  aspects,  and  the  bitmap  should  be  adjusted  for  non-  1:1
  270. environments.   Then  again,  the  aspect  of a  pattern fill,  may not
  271. matter, with regards to aspect.
  272.  
  273.      If an  error is  detected, then  the interpreter  in the  terminal
  274. program  will skip  characters  until  a  double  escape or  a carriage
  275. return comes along and respectively  exit GRIP command mode or continue
  276. interpreting.
  277.  
  278.      I would like to  see this  standard go  far towards  standardising
  279. BBS  graphics and  Telnet graphics  alike.  I  hope that  the author of
  280. SKYPIX is  not too  uncomfortable, but  it is  you that  caused healthy
  281. competition in  the  area  of  communications  graphics protocols,  not
  282. me.... 8-)
  283.  
  284.      I consider this to  be shareware  information, and if you make any
  285. money out of this  info, please  think of  me when you think of keeping
  286. all the  spoils for  yourself...  And  think of  me when  you do  so...
  287. sigh!!!
  288. -----------------------------------------------------------------------
  289.                        HOW TO CONTACT THE AUTHOR
  290. -----------------------------------------------------------------------
  291.  
  292.     Internet:  s3007048@mackay.mpce.mq.edu.au
  293.  
  294.   Compuserve:  internet:s3007048@mackay.mpce.mq.edu.au
  295.  
  296.      Fidonet:  "Internet" at node 3:713/602, 3:632/400 or 1:105/14
  297.                First line of text as follows:
  298.                To: s3007048@mackay.mpce.mq.edu.au
  299.  
  300.   Snail-Mail:  Michael Glew
  301.                Lot 61 Warrambool Road
  302.                Tumbi Umbi NSW 2261
  303.                Australia
  304.