Seawolf 1.0 (Release)

 

CS184 Final Project, 9 May 2001

Lawrence Leung (-cw)

Leonard Chung (-ee)

-------

 

After three weeks of long days, late nights, and over 11,000 lines of code, we are pleased to present Seawolf 1.0. Seawolf is a networked multiplayer real-time OpenGL-based 3D submarine warfare game. A machine is selected to act as the master server while client computers connect to it in order to join the game. Network communications are handled through a transaction-based system over UDP packets.

 

The graphical aspect of the game contains many features. Among the ones we implemented are object and floor/ceiling collision detection, fog, occlusion, particle effects, texturing, direct 3d model loading, OpenGL optimization, custom 3d models, and alpha blending. The game allows for user controlled camera angles along with user selectable submarine models. The floor is derived from a game generated height map. Particle effects are used in explosions and oxygen bubble effects, while alpha blending is used for underwater explosion shockwave effects. 2D OpenGL calls are also used to create a Heads Up Display (HUD) with damage meter and sonar detection of objects and a white “North” indicator. A vector and rotation library was also created to allow for easy manipulation of objects.

 

Gameplay features include visibility limitations on the long-range sonar and actual visual field, a submarine-inspired motion system with viscosity, user selectable submarines with different characteristics such as top speed and armor, and world objects such as torpedos and mines.  Along with the 3D display, the HUD displays most critical information about the game state. Included in the HUD is the sonar along with a 2D damage indicator that shows damage incurred by various parts of the ship. As damage increases, the appropriate damage indicator increases in length and changes color depending upon the hazard level (Green, Yellow, or Red). Seawolf is also capable of playing sounds to correspond to various events such as torpedo launches and explosions.

 

Networking is another major feature of Seawolf. Seawolf has a transaction layer that takes game events such as motion and object death and converts them into transactions that are in turn converted into UDP packets that are then sent over the network to a remote machine that reverses the process. Clients negotiate with the server their unique identification and player information such as the selected model and their player name. The server then sends the client the world, and continually works with the client throughout the game to ensure world temporal continuity. The network layer was difficult to design and implement due to the inherent complexity of attempting to ensure a consistant state across the various client machines while dealing with packet loss and varying latency. The fact that network had to be debugged across two machines simultaneously while the amount of data sent between them was quite large didn’t make things easier.

 

Some suggestions to achieving optimal game experience:

1) Run the game server on a machine separate from the client machines

2) Make sure you have at least a 400MHz processor and a descent graphics card (3dfx or nVidia)

3) When starting a new game, take down both the client and server rather than connecting to the same server from a client that has previously connected.

4) When moving with the mouse, use small, precise motions rather than large ones.

5) Motion controls: hold down the right mouse button and drag up and down to increase and decrease velocity. To tilt the sub up and down, drag the mouse up and down with the left mouse button. To roll the sub side to side, drag the mouse side to side with the left button. The sub is able to turn through the use of rolling the sub (and its associated stabilizer fins) to the side while the sub has a forwards or backwards velocity.

 

Keyboard shortcuts:

F1 – User defined camera (see help button for more info)

F2, F3, F4, F5 – Pre-defined camera angles

ESC – Quit

Z – Fire torpedo

Q, A – Adjust radar scale

TAB – Switch to next user object (if user controls more than one)

 

Debug stuff:

X – Test sub explosion

S – Test sound

K – Kill the engines

 

Notes:

There are known problems with the E&S cards.  Please use systems with

Nvidia or 3dfx cards. Disabling sound though on E&S systems seems to allow basic functionality at a slow rate.

Networking isn't perfect but it works.  What you have to do is start

a server by clicking "Host Game" in one instance seawolf to start a server.

 

Then in another instance of seawolf you type in that machine's hostname

or ip into the edit box and hit connect.  If you get a Pong then it connected successfully.  Don’t click on this button multiple times as it's not designed to do that yet. Then click Next and it should bring you into the world.

 

You can run the server and client on the same machine but it'll be dirt slow right now as it's unoptimized.

 

The current binary releases are built as debug so they will only work

properly if they're running on machines with MS VC++ on them with the

appropriate debug dll's.

 

The webpage is at:

lar2.dyndns.org/~larry/seawolf

or

chung.yikes.com/~leonard/seawolf

 

Our cvsweb is at http://lar2.dyndns.org/cgi-bin/cvsweb.cgi if you want to view the current code without accessing CVS.  (If you want I can set up anonymous cvs)

 

This is targeted for Linux 2.2.x and Windows 98/NT.

 

Build Instructions (skip if you have the binary release)

-------

Building this requires SDL 1.1.8+,SDL_image, SDL_mixer, lib3ds 1.0.0+,

my hacked up version of Paragui 0.6.5 (in my cvs), SDL_ttf, truetype,

SDL_net, and of course OpenGL/GLu/GLaux.

 

Make sure you enable RTTI for paragui or exception throwing will fail under

linux (configure --enable-rtti)

 

UNIX:

-if the configure script doesn't exist run:

        - aclocal

        - autoconf

        - automake -a

-run the configure script by typing ./configure

-type make to build it

 

Windows:

-load the workspace file

-build dependencies and copy the .lib and .dll files to this directory

-check if the include directories point to the right places (SDL, lib3ds)

-build as Win32 Debug

 

Artwork

-------

Expand the artwork archive into the artwork subdirectory.

 

 

Running

------

Please make sure the artwork is correctly installed.

 

Unix:

 -type ./seawolf

 

Windows:

 -either run it from MSVC or

 -from the dos prompt cd into this directory, run Debug/seawolf.exe

  if you built it or click on seawolf.exe if you downloaded a binary release.

 

--------------------------------

Thanks to:

 

SDL project  (http://www.libsdl.org)

 - Their wonderful portable toolkit and modules to abstract graphics,

 sound, I/O, and network

 - made this project possible.

 - Their demo code provided a good starting point for our project.

 

lib3ds project (http://lib3ds.sourceforge.net)

 - 3ds Model Loading library and example code used to load our models

 

Paragui (http://www.bms-austria.com/projects/paragui/)

 - Their widget set made the pretty startup screens possible.

 

Jeff Molofee's OpenGL Tutorials (http://nehe.gamedev.net/opengl.asp)

 - His tutorials helped a lot with basic opengl stuff.  We based

   our texture loader off of his example.

 

Terra3D (http://www.gldomain.com)

 - This landscape renderer inspired us to

 - One or two of his textures from the GPLed demo made it into the artwork