Sink or Swim Help Contents

Help Topics

Getting started

Sequence of play

Error Messages

Copyleft

Options

Credits

This program is the class project for Ken, Mike, and Chris for the course EE596, Windows MultiMedia programming at San Diego State University.  Development time was in about 4 weeks, or roughly 300 hours, and uses the Microsoft Foundation Classes (MFC) that is distributed with MSVC++.

The goal of Sink and Swim is amazingly similar to the Battleship board game that we all remember from our youth.  Here, you place your ships, you get connected to an opponent, and you start trading shots.  When you hit on an enemys ship, you are rewarded with a nice explosion.  You also get to watch their progress as they try to find your ships and sink them.  When you sink all of your opponents ships (or all of yours are sunk), the game ends, you are disconnected, and the game resets.

For maximum effects, be sure to read the README file that came with this package concerning placement of sound files.

Visit SDSU at http://www.sdsu.edu/


Sink or Swim Getting Started
Getting Started

You must first have your networking software running.  If you are going to service an incoming request, place your ships and simply select the menu item File/Listen and wait for the incoming request.  If you are going to connect to another PC, you must know the internet hostname of that machine, enter it into the dialog box generated by the menu Options/Networking/Connect, then place your ships and select the menu File/Connect.  If you wish to abort the connection to play elsewhere, use the menu File/Disconnect.  Exiting the program will gracefully disconnect as well.  To place your ships, click on the ship in the toolbar then left-click on the left side of the screen (home) to place the ship.  If you wish to switch its orientation, right click the mouse.

Notice:

There may a small problem on people who have their displays set to smaller than 1024x768... the word Horizontal or Vertical denoting ship placement orientation, may appear in the water on the Home side.  This will be addressed in a later release.


Sink or Swim Sequence of Play
Sequence of play

Once connected, as pointed out in Getting started, whoever did the File/Listen menu gets to fire the first shot, then shots alternate until either all of your or your opponents ships are sunk, or until either person disconnects.  Fire at your opponent by double clicking in the target area, or right hand side of the screen.  When you win or lose, the game is over... it tells you that you won or lost, disconnects from your opponent and resets.


Sink or Swim Error Messages
Error messages

There are several dialog boxes that popup during the course of the game.  While some of these arent really errors, they, too, will be discussed here.

You must be connected to send.  This occurs when you try to send before youre connected.

WAIT YOUR TURN.  You must get shot at before firing again.

Send error.  This really shouldnt ever happen.  If it does, restart your game, then if necessary, restart windows.

Receive error.  Same as send error.

Error looking up hostname.  This means that either the hostname that you entered doesnt exist, or that the DNS server for the domain that you are connecting to is unreachable.

Please enter a hostname.  The games default options are for no hostname, so you must fill this in prior to connecting.

There are other self explanatory error boxes that occur if you try to listen or connect after you already are connect(ed/ing) or listening.


Sink or Swim Copyleft
Copyleft

Please distribute this program freely.  If you feel so inclined, you may (or if you get addicted - should) donate $5 or more to:

Chris Kelley, Mike Fenston, and Ken Robinson.

Contact us via email for a snail mail address.  If you really, really enjoy playing this, and/or want to see revisions including more or better functionality, pay up.  Those with the best suggestions will be cited in the help file.

The source code is available to aid other students in learning networking or MS VC++ programming.

Email requests and comments to kelleyc@rohan.sdsu.edu, fenston@mail.sdsu.edu, or robinson@rohan.sdsu.edu.


Sink or Swim Options
Options

Networking Connect: allows you to set the hostname and port number to connect to.

Listen: allows you to set a different port to listen on .

The default port is 1026.

Sound Allows you to set the level of sound play.  Available options are to enable or disable the background midi music, and then two levels of WAV files for sound effects: normal, attitude, and none.


Sink or Swim Credits
Credits

We credit the following sources for aid in development of this program:

Dr Leonard Marino, Instructor of EE596, Windows Multi-Media Programming at San Diego State University.

D. Kruglinski, Inside Visual C++, ver 1.5, Microsoft Press 1994

O & N Gurewich, Master Visual C++ 1.5, SAMS publishing 1994

P Bonner, Network Programming with Windows Sockets, Prentice Hall 1996