home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / tcp / Networking / TCP / Clients / Nothello / Nothello.doc < prev    next >
Encoding:
Text File  |  1994-06-08  |  15.3 KB  |  398 lines

  1. NOTHELLO        for MUI 2.0 and AmiTCP/AS225
  2.  
  3. [This document is the amigaguide version sans the amigaguide information.  For
  4.  some reason, I can't get the .guide to work on OS2.x amigaguide.  It works fine
  5.  for 3.0 machines.  If anyone is generous enough to find my error, I'd really
  6.  appreciate it if you'd let me know what it was.  Thanks]
  7.  
  8.  
  9.                           This application uses
  10.  
  11.  
  12.                         MUI - MagicUserInterface
  13.  
  14.                   (c) Copyright 1993 by Stefan Stuntz
  15.  
  16.  
  17. MUI is a system to generate and maintain graphical user interfaces. With
  18. the  aid  of  a  preferences program, the user of an application has the
  19. ability to customize the outfit according to his personal taste.
  20.  
  21. MUI is distributed as shareware. To obtain a complete package containing
  22. lots of examples and more information about registration please look for
  23. a  file  called  "muiXXusr.lha"  (XX means the latest version number) on
  24. your local bulletin boards or on public domain disks.
  25.  
  26.           If you want to register directly, feel free to send
  27.  
  28.  
  29.                          DM 20.-  or  US$ 15.-
  30.  
  31.                                   to
  32.  
  33.                              Stefan Stuntz
  34.                         Eduard-Spranger-Straße 7
  35.                              80935 München
  36.                                 GERMANY
  37.  
  38.  
  39.  
  40.  
  41. ************************************
  42. ** Introduction
  43. ************************************
  44.  
  45.  
  46.                         Introduction to Nothello
  47.                                 
  48.   Nothello is a little project I wrote as a result of being able to play
  49. with the upcoming Grapevine IRC client by Brian Cerveny.  In talking to
  50. Brian, I had visions of all the potentials of having an Amiga-based IRC
  51. client, that can start up other clients as a DCC command.  Nothello was
  52. the first result of my ideas.  I know of others who are planning clients,
  53. as well, and I have more ambitious plans myself.  Nothello was just
  54. something simple enough to learn sockets programming, and to develop my
  55. own routines and style.
  56.  
  57. While Nothello was designed with IRC startup in mind, it can easily be used
  58. standalone, as well.  All you have to do is call it with the proper 
  59. host and port number arguments, which is what Grapevine will do itself.
  60. It's just more privy to that information than you are. :)  To start it up
  61. on your own, which is really the only way until Grapevine itself is released,
  62. you just find an opponent with either AmiTCP or as225 installed, get his
  63. Amiga's hostname or IP number, agree on a suitable port number to use, and
  64. then run it with the proper args.
  65.  
  66. [Note:  The /DCC startup via Grapevine is subject to change, as Grapevine
  67.         is still in development.  At this time, the planned support through
  68.         Grapevine will be by /DCC command, i.e. /dcc nethello danimal
  69.         If there will be any changes in the startup options for Grapevine
  70.         compatibility, an appropriate version will be released.]
  71.  
  72.  
  73. ******************************
  74. ** Disclaimer
  75. ******************************
  76.  
  77.                         Legal stuff and Disclaimer
  78.                                 
  79. Nothello is freely distributable, but it is NOT to be considered in the public
  80. domain.  I'll hold the rights and stuff for my own personal use.  Noone, other
  81. than Brian is allowed to distribute it for a price other than the cost of a
  82. disk.  Of course, should I be lucky enough to make it on a Fish disk, that's
  83. OK too.
  84.  
  85. I can't imagine what it could hurt, but I cannot accept responsibility for any
  86. problems Nothello may cause to your system.  At this time, it has been tested
  87. reliably on 3.x and 2.x systems, which were 68030 and 68000 machines.
  88.  
  89. Thanks, and even if you don't want to register, please let me know what you
  90. think.
  91.         See Author information for how to contact me
  92.  
  93.  
  94.  
  95.  
  96. ***************************************
  97. ** Requirements
  98. ***************************************
  99.  
  100.                         Nothello Requirements
  101.                                 
  102.         Nothello requires:
  103.         
  104.         MUI 2.0
  105.         A TCP connection to the Internet using either AmiTCP or AS225r2
  106.  
  107.  
  108.  
  109. ***************************************
  110. ** Usage
  111. ***************************************
  112.  
  113.                         Nothello Usage
  114.                                 
  115.   The arguments for Nothello are pretty simple.  They can be entered either
  116. by CLI, or as Workbench tooltypes.  Tooltypes can be commented out by
  117. using parenthesis, so you can keep the host names of some of your favorite
  118. opponents in (), and just un-() when you're ready to play.
  119.  
  120. Here is the CLI argument line:
  121. ORIGINATE/S,NICKNAME,LEFTEDGE/N,TOPEDGE/N,PATH,HOST,PORT/N:      
  122.  
  123. ORIGINATE       Means that when this boolean switch is present, the client
  124.                 runs in a 'server' mode.  For a connection to be established,
  125.                 one client must have ORIGINATE set, and the other not.
  126.                 When running via Grapevine, the ORIGINATE client will be
  127.                 the client of the user who issues the /DCC command.
  128.                 This will also be the user who begins as white, and moves
  129.                 first.
  130.                 
  131. NICKNAME        The nickname of the user.  Grapevine will put your nickname
  132.                 here.  On manual startup, put your nickname in.  It's not
  133.                 really required for play, however.
  134.                 
  135. LEFTEDGE/       Not used, as this is an MUI program, and should save the
  136. TOPEDGE         window settings on it's own.  It's there for Grapevine
  137.                 compatibility.
  138.                 
  139. PATH            Also unused.
  140.  
  141. HOST            Defaults to localhost.  If using ORIGINATE, set this
  142.                 to anything you want-- it won't be used, as the server
  143.                 mode client will be listening for a connection.  If _NOT_
  144.                 using ORIGINATE, set this to the hostname or IP number of
  145.                 your opponent, i.e. danimal.msstate.edu, or 130.18.80.100.
  146.                 
  147. PORT            Defaults to 1999.  Just use some unused port number, like
  148.                 9999 or 4123 or whatever.  The only requirement is
  149.                 that the port numbers must agree for both clients.
  150.                 Grapevine will take care of this for you, but it's a little 
  151.                 extra work for manual startup.
  152.  
  153.                 
  154. So, a sample game could be started like such:
  155. Player 1:
  156. Nothello_AmiTCP originate nickname=danimal host=blah port=9998
  157.  
  158. Player 2:
  159. Nothello_AS225 nickname=Chuck host=danimals.machines.name.edu port=9998
  160.  
  161.  
  162. Note that player 1 doesn't put in a valid host, but it will not be
  163. used, because of the ORIGINATE switch.
  164.  
  165.  
  166.  
  167. The originating client must be started first, so that it can listen for a
  168. connection from the other client.  The originator will open it's window,
  169. and watch the port, until a connection is made.  If no connection is made
  170. in 60 seconds, the program will timeout, and exit cleanly.  
  171.  
  172. Once the originator is setup on the port, and the other client 'calls' the
  173. port, a connection will be made, and gameplay begins.
  174.  
  175.  
  176. *****************************************
  177. ** Playing the game
  178. *****************************************
  179.  
  180.                         Playing the game
  181.                                 
  182.   Once gameplay begins, it's just Othello, but with a competitive twist.
  183. When it's your move, click on the square to make your move.  There is a 
  184. little message line that tells you whose move it is.
  185.  
  186.   Options once gameplay starts include:
  187. [Note:  An asterisk (*) denotes that this button can only function when it is
  188.         your turn to move.]
  189.           
  190.           
  191.                    *Forfeit your move  Taunt 
  192.                  *New  Info  Swap Colors  Quit 
  193.  
  194. Menus are available, with a couple extra options:
  195.  
  196.         Project         Game
  197.         -------         ----
  198.          About.. ?       New Game             N
  199.          -----           Forfeit              F
  200.          Quit    Q       Swap Clrs            S
  201.                          Taunt                T
  202.                          Last Move
  203.                          Show Opponent Moves
  204.                          Show Type..
  205.                                 Invert
  206.                                 Selected
  207.  
  208. The [HELP] key will load this amigaguide document if you have it in the same
  209. directory.
  210.                                         
  211. When someone wins and the game is over, both players will have the option to
  212. start a new game or quit.  If either player quits, then the whole match is
  213. over, and both clients will quit.
  214.  
  215.  
  216. FORFEIT YOUR MOVE
  217.         When you are unable to move, you'll be forced to use this.  It
  218.         simply skips your move and lets your opponent go again.
  219.  
  220.  
  221. TAUNT
  222.         This is a fun little extra, to add some serious competitiveness to
  223.         this game.  Pressing the Taunt button brings up a window with a 
  224.         string requester, where you can type in a verbal assault on your
  225.         opponent.  Of course, you can just tell him that was a good move,
  226.         but why be nice?  It's there to lay into him, and to keep the
  227.         growls and grumbles off the IRC channel.  The tauntee will have a
  228.         requester pop up over his screen, containing your taunt, and he can't
  229.         resume play until he accepts it.  Have fun with this. :)
  230.  
  231.  
  232. NEW [GAME]
  233.         Requests a new game from your opponent.  This is a 'chicken' button,
  234.         to be used when you think there is no hope of winning.  Of course,
  235.         your opponent can allow you to restart and humiliate yourself, or
  236.         go for the throat and make you continue with the thrashing. :)
  237.         
  238.  
  239. INFO
  240.         Simply pops up a window that can be closed at any time, which
  241.         displays the nickname, host, and port of your opponent.  Not 
  242.         particularly useful. ;}
  243.         
  244.  
  245. SWAP COLORS
  246.         This can be done at any time, and simply swaps all the colors.  If
  247.         you're white, you'll become black, and your opponent will appear
  248.         white to you.  Note that this is totally transparent to your opponent--
  249.         he'll still see you as white himself.
  250.         
  251.  
  252. QUIT
  253.         Will quit the game.  The window close gadget also functions in the
  254.         same way.  Your opponent can not stop the quit, but he'll be happy
  255.         that you've apparently given up. :)
  256.        
  257.  
  258. LAST MOVE
  259.         Last move will highlight the piece that was clicked on the last move.
  260.         It utilizes the active gadget function of the MUI user interface, which
  261.         draws a black border around the piece.  This lasts for one second, and
  262.         will show both yours and his last move.
  263.         
  264.  
  265. SHOW OPPONENT MOVES
  266.         Show Opponent moves is a little different from the Last move feature,
  267.         in that it will highlight all the pieces involved in your opponent's
  268.         last move.  Just in case you blinked or weren't paying attention when
  269.         his last move was made.  Defaults to CHECKED.
  270.         
  271.  
  272. SHOW TYPE
  273.         Show Type sets the type of highlighting that you want to use for the
  274.         Show Opponent Moves function.  There are two different show types:
  275.         
  276.         INVERT
  277.                 Will use the inverse color for the background of the button
  278.                 behind his chips.  For example, if his chips are white, the
  279.                 background will be black.  This is the default setting.
  280.                 
  281.         SELECTED
  282.                 Will use the MUII_Selected image structure for the background
  283.                 of the highlighted opponent's piece.  Normally, this is just
  284.                 a slightly lighter color than the normal button background.
  285.                 However, using the MUI-Prefs program, you can use a custom
  286.                 brushmap for the selected image.  This makes for some really
  287.                 pretty (or wacky) custom Nothello windows.
  288.                 
  289.  
  290. *****************************************
  291. ** Enhancements
  292. *****************************************
  293.  
  294.                         Possible Enhancements
  295.                                 
  296. Daemon operation.  Challenge someone whether they're on IRC or not.  Or maybe I
  297. should say whether they expect it or not. :)
  298.  
  299. Manual startup window.  Won't have to worry about CLI or WB args
  300.  
  301. De-MUI the interface.
  302.  
  303. Artificial intelligence.
  304.  
  305. Automatic checking for a forfeit move.  Easy to do once the artificial 
  306. intelligence routines are in place.
  307.   
  308. Maybe some kinda custom object that looks like the Knight Rider car's 'eye,'
  309. for when the computer is 'thinking.'
  310.  
  311. 1 or 2 player mode not requiring networking.  Could just easily remove all the
  312. networking routines, and the thing would be about 15k smaller.
  313.  
  314. Any other enhancements suggested to me. :)
  315. send suggestions to djm2@ra.msstate.edu
  316.  
  317.  
  318. *******************************
  319. ** Bugs
  320. *******************************
  321.  
  322.                                 Bugs
  323.  
  324. Uhhh.... Uhhhh... well, if you find any, let me know. :)  Just because I
  325. think it's bug-free, doesn't mean it really is.  It does appear to be solidly
  326. enforcer-hit free.
  327.  
  328. One thing I wasn't able to adequately test for myself was AS225 operation.  I only
  329. had AmiTCP at my disposal, but I did use the emulator socket.library, and any time
  330. I tested it over the net, I always used the AS225 version without a hitch.  I dunno
  331. if that was a good test of the AS225 version or not.  I did have one tester using
  332. AS225, and he reported no errors to me.
  333.  
  334.  
  335.  
  336. ********************************
  337. ** Credits                      
  338. ********************************
  339.  
  340.                                 Credits
  341.                                         
  342. Tons o' credits here.
  343.  
  344. Chuck Woo for his tireless beta testing and whining.  Also, for being an
  345. easily defeated opponent and boosting my ego. :)  Chuck also sent me some
  346. documentation on adding AI into games, but (shhh! Don't tell him!!:) I
  347. haven't read it yet! :)
  348.  
  349. Brian Cerveny, aka Redwine, for occasional help, and asking me WTF I wanted
  350. to do some things certain ways that made little or no sense.
  351.  
  352. Scott Ellis.  If it wasn't for his free source to AmiPOP, I wouldn't know
  353. a damn thing about programming networking stuff.  I horked a ton of lines
  354. of his for my own use.
  355.  
  356. Ralph Schmidt, aka Laire, gave me a good argument parsing routine.
  357.  
  358. Chris Feck fixed up my ridiculously short-sighted chip-drawing routine.
  359.  
  360. Seth Harman, known in the underworld as Budha, did the icon. [also changed
  361. the name from the original Nethello, cause the icon works better with an 'o']
  362.  
  363. John Weiderhirn tried for a couple days to figure out what a horrible problem
  364. was in my code.  I later noticed I hadn't allocated a certain string, which
  365. of course, broke my entire program.  He also has given me a lot of motivation,
  366. ideas, and strategies for a possible career in networking.  Thanks John, for
  367. the speech, and hope you didn't mind me leading you on a wild goose chase. :)
  368.  
  369. Ezra Story, alias Ezy, showed me a couple of tricks to get my accept a 
  370. connection routine to timeout, as well as detecting a disconnection.
  371.  
  372. Eric Totel, who authored the really cool Builder for MUI, which I used a little
  373. bit so long ago.  Just wish I'd had the newest version with 'Copy Object,' so
  374. I wouldn't have had to make all those chip buttons by hand...  :P
  375.  
  376. Thanks, guys..
  377.  
  378.  
  379.  
  380. ********************************
  381. ** Author info
  382. ********************************
  383.  
  384.                         Author Information
  385.                                 
  386. I plan to keep working on it for fun, and if you want the latest version,
  387. send something like $3 USD and you'll become a registered user or something
  388. like that.  You'll get the latest version, and each major version after that.
  389. Also a discount on registered versions of the next couple of projects I plan
  390. to start soon.
  391.  
  392. Dan Murrell Jr.
  393. "Danimal" on IRC
  394. djm2@ra.msstate.edu
  395.  
  396. McKee Trailer Park, Lot #7
  397. Starkville, MS 39759
  398.