Boa
The software is released as Freeware. No obligations to support it
or warranties are made hereby, use it at your own risk. You may freely
copy and/or modify the software for any non-commercial use, you must
however retain the original documentation provided with it unmodified.
If you make any modifications you think could be worth merging into
the software, or if you have any bug reports/clever suggestions,
or if you just want to thank us for the game - your mail will be
appreciated, just 
mail
Vassilii 
and/or 
mail Lev.
The most recent version can be found at http://www.tarunz.org/~vassilii/pub/boa/.
If you want a notification for every update, mail
Vassilii about that.
Share and enjoy!
Contents
Boa is a multi-player clone of the good old worm(6) game.
Sounds primitive? 
The game proved to be very addictive when tested in
the WISDOM computation center 
during summer, 1996.
The game includes a server (boaserv),
an interactive client
(boa) and a robot client
(boabot).
Credits
	- The original 
		UNIX® version.
	
- The two-player clone 
		NIBBLES.BAS,
		distributed with
		MS-DOS®
- Brian Swetland - for
		our
		vt100 emulator for the 3Com® 
		PalmPilot®. This
		program inspired the variable size support implementation,
		as well as the PalmPilot section of this
		manual.
	
- Dmitrii Rubinstein
		and Brian Swetland
		- for finaly making Vassilii 
		finish this manual and release the game.
History
	- May 1996
- Lev and Vassilii play NIBBLES.BAS
		many times on an MDA 
		IBM PC/AT 
		tetris.wisdom.weizmann.ac.il
		(dedicated machine for playing games
		while waiting for the jobs coming out of the nearby printer
		laser12.wisdom.weizmann.ac.il).
	
- May 1996
- Lev writes the initial prototype of
		boaservandboafor
		SGI®
		IRIX(TM)
		5.
		This version has numerous
		network-related bugs, e.g. the program crashes when the third
		party connects.
- June 1996
- Vassilii joins the
		development; the codebase is moved to a 
		GNU 
		RCS archive.
		Vassilii takes over the server part, 
		Lev concentrates on the client,
		however occasional patches are done here and there by both.
- June-July 1996
- The server logic is re-written,
	the network protocol is debugged and then significantly improved.
	The client outgrows the initial hackish code and is redesigned from
	scratch in real C++;
	an abstract client API created. boabotwritten atop it.
- July 1996
- 
		Development completely abandoned after overall of about a week
		of joint work invested into it. All the faculty computational
		center frequent visitors are playing. People start playing from
		remote hosts on the campus and the server records new connections
		around the clock.
		The mania continues until September. The
		robotic client
		still has bugs, yet people are too angry with its competing
		ability to make further improvements desirable.
	
- 9-10/August 1997
- 
		Vassilii ports the game to 
			Linux, 
			SunOS(TM)
			and
			gnuwin32. 
		During the ports, numerous byte-order and sockets
		programming bugs are suddenly discovered and eliminated.
	
- 2/November 1997
- 
		Vassilii adds the size and delay
		command-line options to make it possible to play
		from a vt100
		emulator for the 3Com® 
		PalmPilot®.
	
	- I assume you have a `make' utility that is intelligent enough
	to cope with my GNU makefile, and a modern g++ (I recommend either
	2.6.4 or a 2.7.2.x by today). Otherwise you will have to play with
	the makefile.
	
- Determine your architecture (run `uname -a' if in
	doubt). Then assume that arch below is
	one of sgi,linux,sunorgnuwin32, whichever is appropriate for your
	platform. If in doubt, try all the possibilities.
	The code has at least one unportable point
	in it, and I am sure
	it has other ones; so chances are that you'll have to tweak with
	the sources if you have another platform.
- make -f Makefile.arch
- cd bin.arch
- cp boa boaserv boabot /usr/local/games
 or to whatever location you want it to be run from later.
- Check the executables' 
	permissions (chmod(1),umask(1)) and you are done.
By default the game uses tcp port 5555; the field is 80 columns
wide and 24 lines high by default.
The rules are similar to the original worm(6).
	- The obstacles are:
		- the field border;
		
- a worm's body.
	
 
- Each prize you eat adds to your points and your length its value.
	Each time your length gets a multiple of 60 you are awarded an extra
	life. Each time you loose a life your length is truncated to 2.
	Initially you are given 3 lives.
	
- The game objective becomes totally different. If you play alone,
	it is the same as in the original game, of course. If you choose
	adding robots, life becomes difficult. Can you attack a robot and
	make it die? How about making him spending his lives faster than he
	is gaining them? How many robots can you co-exist with, still
	attacking? How many still just surviving?
	
	Multi-player games with more than one human are much more amusing.
	I know fanatics that could easily tell who exactly was driving a specific
	worm - and can you tell a robot from an experienced player remotely?
	Can you pretend that you are a robot and fool your friend that
	answers "yes" to the previous question?
 
Just run it for a default game. For more info, see the following excerpt
from wserver.cpp:
/*
	Usage examples:
		boaserv
		boaserv 239
			to run on port other than DEFAULT_PORT
		boaserv 239 40
			to run on port other than DEFAULT_PORT
			with field width other than FIELD_WIDTH
		boaserv 239 40 20
			...
			with field height other than FIELD_HEIGHT
*/
main(int argc, char **argv)
{
	int nWidth, nHeight;
	nWidth = (argc > 2)?atoi(argv[2]):FIELD_WIDTH;
	nHeight = (argc > 3)?atoi(argv[3]):FIELD_HEIGHT;
	
	// Shrink larger fields so that the hardwired boabot doesn't crash
	if (nWidth > FIELD_WIDTH) nWidth = FIELD_WIDTH;
	if (nHeight > FIELD_HEIGHT) nHeight = FIELD_HEIGHT;
Prints its usage when run without arguments:
% boa 
Usage: boa <server>[:<port>] [--<digit>] [oldchar=newchar ...]
        <digit> is 1 by default, it gives the # of tenths of a second
                you are given to enter the input after the screen update
        If no remapping of the form oldchar=newchar is given, the following
        controls are in effect during the game (like in vi(1)):
                Left -- cursor left, or 'h'
                Down -- cursor down, or 'j'
                Up -- cursor up, or 'k'
                Right -- cursor right, or 'l'
                Quit -- 'q'
        Oldchar is any of [hjklq], newchar is any single char
        Example:
                        boa wormserver h=o j=a k=q l=p q=Q
                enables the following controls:
                        Left -- 'o'
                        Down -- 'a'
                        Up -- 'q'
                        Right -- 'p'
                        Quit -- 'Q'
Prints its usage when run without arguments:
% boabot
Usage: boabot <server>[:<port>]
Must be run before the other clients connect.
DO NOT FORGET TO KILL YOUR BOABOT AFTER YOU LEAVE!!!
I use the following settings when playing the game from my PDA:
	% boaserv 5555 40
to run the server,
and the following tcsh(1) alias setting in my
.cshrc:
	% alias ww boa localhost --3 h=v 'j=^L' 'k=^K' l=u
^L and ^M above signify the symbols "Ctrl-L"
and "Ctrl-M", respectively. The --3 argument is to
make the LCD display update be easily seen before the time to respond
with a new move is over. So the controls become the pilot keys
"Page Up" and "Page Down" for the vertical motion, and graffiti
"u" and "v" for horisontal motion. Note that you can enter these
as "V" drawn left to the right for "u" and right to the left for "v",
which is almost as simple and easy to associate with horizontal motion
as strait horizontal lines.
I have currently been playing with the Brian's vt100 emulator 
ALPHA 5 at 2400 baud. (See also the About section).
As soon as he adds keymap support, it will be much easier to play.
Or use a keymap hack if you are impatient.
	- This bug list is unordered.
	
- The boabot clients compete 
	only with the clients that connect
	after them. Introduced as a dirty solution of decreasing the CPU 
	time wasted if the only boabot is left in a game, this
	breaks the competition symmetry between the bots.
	
- Proper documentation lacking. A section on the pros and cons
	of the current network protocol is especially needed.
	
- Command-line interface needs to be improved (esp.: introduce
	flags instead of ordering the numerical args in the server)
	
- Remove field dimensions upper bound (will need true size support
	in the clients)
	
- The platform-dependant define names are sometimes misleading
	(e.g. Makefile.gnuwin32 sets both -DLINUX and -DGNUWIN32). Correct
	this.
	
- The time syscalls used are unportable for at
	least AIX.
	
- The porting stuff makes it worth to create an autoconf
	distribution.
	
- Improve the client scores and lives printing, do not rely on
	the 24th line (esp. make it nicer when too many clients are
	connected)
	
- Allow long jumps w/o screen update, like in 
		worm(6)androbots(6)
- Fix the pacing bug in boabot
	
- Major protocol improvements wanted: 
		- make screen size negotiable during the game
		(allow all agree upon a resize when a game is playing?)
		
- introduce game options: initial size, resizable?,
		allow/disallow new players in the middle, upper bound on the
		players number, networking timeouts etc.
		
- IRCish: allow multiple channels for multiple games,
		with game options independant per channel
		
- allow a passive client (the one that others do not
		wait for in case of a lag) to allow remote watch of a game
		
- oblige the bots register on the server, and 
		go asleep together if there's no more human clients, instead of
		the current "compete only with later connected"
		hack, which breaks for more than one robot.
	
 
- Rewrite the server; add an option of built-in robots
	basing on the client API, improve the API for that if needed
Last updated: 
$Date: 1999/05/10 13:53:56 $
	 by 
$Author: vassilii $