Changes between Version 1 and Version 2 of Ruby Client Tutorial


Ignore:
Timestamp:
Aug 17, 2011 5:20:31 PM (13 years ago)
Author:
kedwar10
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Ruby Client Tutorial

    v1 v2  
    11= Getting Started =
     2This client implements a subset of the features found on the Clojure client.  All commands in this client block until completion.
     3
     4To run the client, open up a terminal and cd to the top level directory and type
     5
     6{{{
     7bash-4.2$ sh run
     8irb(main):001:0>
     9}}}
     10
     11This script will load core.rb and start the ruby interpreter.  To open up a map use the 'ioquake' function with a mapname.
     12
     13{{{
     14irb(main):001:0> ioquake 'sat'
     15}}}
     16
     17ioquake should now be running in a separate process. Set the fullscreen option to false in setup if ioquake is maximized.  Now hit ` to free the cursor from ioquake.  A new quagent can be added by calling Quagent.new (this may take several tries):
     18
     19{{{
     20irb(main):007:0> q1 = Quagent.new
     21=> #<Quagent:0xb7696538 @conn=#<TCPSocket:0xb76964d4>>
     22irb(main):008:0> Quagent connected at socketfd 30.
     23loaded skill 1 from bots/default_c.c
     24loaded skill 1 from bots/sarge_c.c
     25loaded bots/sarge_i.c
     26loaded bots/sarge_w.c
     27loaded sarge from bots/sarge_t.c
     28ev jo 1 quagent
     29}}}
     30 
     31
     32
    233
    334----
    435= Organization of Code =
     36* util.rb : general functions.
     37* protocol_one.rb : contains the quagent class which interfaces with protocol zero.
     38* commands.rb : contains user-friendly wrappers for common protocol zero commands.
     39* core.rb : general workbench; load this file when using irb.
    540
    641----
     
    1247----
    1348= Issues =
     49* Loading a quagent into the virtual environment sometimes takes several tries.