.|'''| '||'''|, || || '||` || || || || || || `|'''|, .|''|, '''|. ||;;;; '''|. ''||'' ''||'' || .|''|, . || ||..|| .|''|| || || .|''|| || || || ||..|| |...|' `|... `|..||. .||...|' `|..||. `|..' `|..' .||. `|... version 1.1 -- 23 December 2021 A Game By Vince Weaver -- Who cannot draw ASCII ships vince@deater.net http://www.deater.net/weave/vmwprod/seabattle.html Another Amazing Project for ENEE114 \---------------------------------------------------------------------------/ Works Best on Linux (color and sound) Also works on most UNIX systems and Windows/DOS (DJGPP) /---------------------------------------------------------------------------\ Background: ~~~~~~~~~~~ This was written in May of 1997 as a final project for the ENEE114 Intro to C programming course at the University of Maryland. The project was to write a simple battleship implementation. There was supposedly a prize for the best version, which is why I went a bit overboard. As far as I know no prize was ever awarded. I never thought it would be still in use this many years later, but here we are. Compiling and Installation Instructions: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pre-requisites Linux: you'll need to have ncurses installed (debian: "apt-get install libncurses-dev") you'll need to have aplay installed for sound (debian: "apt-get install alsa-utils") For Unix (Compiling from Source): Untar the file. All the untarred files should end up in a directory called "seabattle-1.1". Edit the Makefile. Be sure to uncomment the lines applicable to your Particular Platform/Compiler. Type "make clean", then "make all" [w/o the quotes of course] This will compile on most Unixes with the "curses" library. SUN, SGI and Linux known to work. Also works on DJGPP for Dos/Windows. DJGPP requires the pdcurses library, obtainable at http://oak.oakland.edu/pub/simtelnet/gnu/djgpp/v2tk/pdc22.zip SEABATTLE WILL NOT COMPILE ON DIGITAL UNIX. (faulty curses lib?) To run [assuming it compiled fine] type "./seabattle" For Dos/Windows: Unzip zip file. If using pkzip, use "pkunzip -d seab10.zip" to preserve directory. All the files should be there. Run "seabattl.exe" to play. \---------------------------------------------------------------------------/ ERRORS: /---------------------------------------------------------------------------\ Problem: "Sorry, I don't know anything about your "XXXX" terminal" (where XXXX is the terminal you are using) appears. Solution: Try running it as 'env TERM="vt102" seabattle' or 'env TERM="vt100" seabattle' . This might be necessary if your termcap is not set up right. Problem: Garbage on the screen and things are not lining up right. Solution: As with the previous program, try running the program with one of the following commands: "env TERM=vt102 seabattle" or "env TERM=vt100 seabattle" Problem: High score list/ user info is not saving. Solution: Make sure you have write permissions to the directory seabattle is installed in. Problem: I hate the sounds! Solution: Sorry. Press "S" to turn them off while playing the game. If it is extremely annoying, try changing the value of the sound variable in batt.c . \----------------------------------------------------------------------------/ USER'S GUIDE: /----------------------------------------------------------------------------\ Run "seabattle" or "env TERM=vt102 seabattle" etc, so that the title screen comes up. If you are on a Linux text console, or in Windows/DOS it should be full color. All other Unixes and xterms will be black/white. This seems to be a limitation of the curses library; only Linux seems to implement standard color functions. SeaBattle will tell you if color is not supported. [Linux color will not work on xterm or rxvt. To get to a linux text console from X, press "CTRL-ALT-F1" or "CTRL-ALT-F2" etc and log into the text screen. Then run it] If you have "/usr/bin/aplay" installed or if '/dev/audio' is found, SeaBattle will ask if you want digital sound effects. These will play during the game. Next you will be prompted for some information. This was a requirement of the project I wrote this for. The only really necessary info is your first name; you can leave the rest blank. Next the menu will come up. To start a new game, press '1'. SeaBattle will ask you to place your ships. Choose the number corresponding to the ship you want. Then use the arrow keys to pick where one end of the ship will go. [You can also type the co-ordinate out, e.g. A1 or B5]. Press the spacebar. Then type N,E,S or W to point the ship in the direction you want. [You can also use the arrow keys]. Repeat this for each ship. If you want to re-position the ship, type the number for it again. You will be prompted if you want to move it. When done, press "Q" to continue. Now it is time to play the game. Place the cursor to where you want to shoot using the same keys you used to position the ships. Press SpaceBar to fire. It should be self explanatory. The sound can be toggled on/off using the "S" key. The menu bar in the middle should also be fairly self-explanatory. \-----------------------------------------------------------------------/ Extra Stuff: /-----------------------------------------------------------------------\ The newest version of sea-battle can be obtained at http://www.deater.net/weave/vmwprod/seabattle.html Send any bug reports, comments, or anything else to Vince Weaver, vince@deater.net Check out other VMW Software productions at http://www.deater.net/weave/vmwprod/ Sea Battle -- A VMW Software Production ----------------------------