home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume15
/
xtb
/
part01
/
README
< prev
next >
Wrap
Text File
|
1993-01-27
|
6KB
|
191 lines
WHAT YOU NEED TO HAVE
=====================
An X11R3 or greater X server. (It might work on earlier X11 releases,
but I havn't tried)
A display of at least 1024(W)*800(H) pixels. (1080 pixels wide is better)
A three button mouse (It's playable with a two button mouse).
A fastish (and unloaded) CPU and reasonable drawing speed.
A fastish network.
Nothing better to do.
Software that supports the following system/library calls and UDP sockets.
Socket/network related
socket(), bind(), connect() ,gethostbyname() ,htonl() ,ntohl()
Timing related
gettimeofday(), setitimer()
General
gethostname(), getpwuid()
Machines with non 32-bit int's could be a problem (Sorry).
Two or more players. (The more the better).
The program works on mono, greyscale and colour displays, and looks
exactly the same on each (I havn't got a colour node :-( ).
COMPILATION OPTIONS
===================
If you have more than 10 people wanting to play, try increasing the
value if MAXUSERS in "defs.h" up to a maximum of 24. This should work,
but is untested.
COMPILING
=========
Type
make
This should create three programs, xtb, xtbd and rtb.
STARTING THE GAME
=================
Pick a node (can be any machine with or without X) and run the server (xtbd).
hostname% xtbd
For each player at a workstation run the client (xtb).
workstation% xtb -h hostname
(ignore messages about datagrams and fielddata)
RUNNING TWO (OR MORE) PLAYERS ON THE SAME NODE
==============================================
The second and further players, should pick different port numbers to
the default (and each other). eg the second player might type
workstation% xtb -h hostname -i 1624
To run two or more servers on the same node, use a different port number
to the default. eg.
hostname% xtbd -p 1627
to contact this server the player would need to type
workstation% xtb -h hostname -o 1627
ROBOT TANKS
===========
If you are short of people or want to practice, the program rtb adds
robot tanks. To create 4 robot tanks type
robothost% rtb -h hostname -n4
Robots re-start when killed after a 5 second delay. The -i and -o flags
for xtb that change the port numbers used are also valid for rtb. For
'n' robots 'n' port numbers are used.
Note: Robot tanks can use a lot more network bandwidth than human players.
SHELL VARIABLES
===============
The shell variables are overridden by the command line options.
XTB_SERVER The hostname of the server to contact by default.
XTB_INPORT The input (client) port number to use.
XTB_OUTPORT The output (server) port number to use.
KNOWN TO WORK
=============
Known to work as a server
Sun 4, DecStation 3100, Microvax 2, Sun 3, HP 9000s827
Known to work as a client (display)
Sun 4, DecStation 3100, HP9000s710 (With X dev. kit)
Works as a client with only a small number of players
Sun 3
OPTIONS
=======
The -w flag turns on warping of the mouse cursor on scrolling. The
default is for the mouse cursor not to be moved when the screen is
scrolled (ie. the square under the cursor remains the same.) (Use what
you find intuitive)
For xtb the -p and -b flags change the method used to draw tanks.
-p uses polygons (as per previous versions)
-b (default) uses bitmaps (pixmaps), this takes much more X server memory,
but seems faster on most machines.
PLAYING
=======
The display has several areas, the main battlefield, (you appear as a
solid black tank, all others display their id) the radar, a damage
display, a message window, a quit button and a list of players and their
id's.
The controls are simple.
Left button -> Fire (in the direction the tank is facing)
Middle button -> Reverse
Right button -> Forward
If you only have a two button mouse, you can use the keyboard to reverse
the tank motion, any key press causes the motion to be reversed, any key
release returns to normal. If you have auto-repeat on your keyboard
(most do), use a key that does not auto repeat (ie. shift,control etc)
This will not work for a window manager that does not implement the
input (push-focus) window manager hint.
The tank will rotate towards the mouse cursor when the cursor is in the
main field.
The solid black squares are obstacles, and cannot be moved through or
fired through.
The hatched areas are rough ground, you can only move at half speed
across these.
The shells have a range of about four squares, you cannot fire again for
2.5 sec after firing.
Explosions do damage according to the (inverse square of the) distance
from the explosion. Two direct hits is sufficient for a kill, near
misses cause smaller amounts of damage.
Killing another player clears your own damage (to encourage friendly
play!).
Quitting should be done using the quit button (NOT the window manager
frame)
It is possible to shoot through the diagonal of two blocks.
NOTES
=====
This was only my third ever X11 program, initially written only with the
on-line manuals for reference. If I were to re-write it, I'd probably
do it differently.
One of the design specifications was that the program should be easy to
install, configure and run, so it does not use any files (other than the
executables) or require require root permissions to install/run.
The program is entirely mouse controlled (unless you only have a two
button mouse)
The program comes with no warranty. I would like the conditions that
apply to GNU software to apply to this software.
Good Luck!
Bernard Hatt
bmh@terminus.ericsson.se
Camtec Electronics (Ericsson), Leicester, England, LE1 4SA.