Airship Combat
by Sergey Levine

Introduction

Airship Combat is a game designed to run on the Windows operating system. Its aim is to accurately and believably simulate battles between sail-powered rigid-body airships, so as to recreate the atmosphere of an "age of sail" naval combat game, but with the added twist of a three-dimensional environment. The game features detailed physics simulation, from the effects of wind on the sails to gravity and accurate collision detection. The game provides new players with an intuitive control scheme, and it provides more advanced players with the option to take more and more components of their ship under their direct control. For instance, a player can order that just one sail be closed and immediately observe as the ship tilts and turns in response to the changing forces of the wind on the remaining sails.

Features:

  • Take command - an intuitive, AI-assisted control scheme provides new players with the ability to command a massive airship with just six directional keys.

  • Detailed simulation - the ship's sails respond to forces in the world, from cannonballs to wind gusts and wind shear.

  • Cause damage - collisions between cannonballs and ships are calculated on a per-polygon basis, allowing any component to be hit; most components have a unique response to damage - booms and rudders will jam, guns will malfunction, and the lifting body will lose gas and air.

  • Guns - ballistics take air resistance and gravity into account, allowing players to add more challenge to their game by manually aiming the guns.

Screen shots:


Manual

Movement

Airship combat has a simple and intuitive control scheme. When automatic control of rudders, booms and sails is enabled, the [S] and [D] keys can be used to turn left and right, the [R] and [F] keys can be used to tilt up and down, and the [Q] and [A] keys can be used to increase and decrease speed. The current speed is displayed in the center of the compass (#1 on the HUD description image, below).
Alternately, any of these automatic controls be disabled and manual controls used. The auto control icons on the HUD (#2) show which components are being controlled automatically. [Z] disables automatic rudder control, [X] disables automatic boom control, and [C] disables automatic sail control. The manual controls are the following:
[P] and [{] rotate the front rudders left and right, and [;] and ['] rotate the rear rudders left and right. [I] and [O] balance the main sails between the top and bottom sails, [K] and [L] balance the main sails between the left and right sails, and [<] and [>] open and close all of the main sails. Finally, [Y] and [U] move the front boom left and right, [H] and [J] move the rear boom left and right, and [N] and [M] rotate both booms. When controlling the ship manually, consider how the forces of the wind would strike the various surfaces to move the ship in the direction you want.

Lifting body

Your airship consists of multiple chambers. Some chambers are filled with air, and some with lighter-than-air gas. #3 on the HUD overview below shows the number of remaining air and gas chambers, as well as the total number of chambers. The more hits your ship takes, the more likely it is that some chambers will become deflated. Chambers are slowly repaired, though the gas chambers can be re-inflated only a limited number of times. The air-filled chambers can be heated to provide more lift. The temperature gauge (#4) indicates how hot the air in your chambers is, and the furnace setting (#5) controls this temperature. You can increase or decrease heat with the [E] and [W] keys. Note that if your airship does not produce sufficient lift to stay in the area, you will eventually hit the water and lose.

Views

You can view your ship from a variety of angles. The arrow keys on the keyboard control where the camera points. In addition, you can switch to other views. [F2] switches your view to "on deck" - you can then use [F7] and [F8] to go the previous or next "on deck" view. From here, you have a good 360 degree view of the battle from aboard your ship, and can aim the guns manually. [F3], [F4], [F5], and [F6] switches to the top left, top right, bottom left, and bottom right gun decks (respectively). In these views, [F7] and [F8] can again be used to switch between each of the four guns on that deck. #6 on the HUD shows a golden border around the gun which you are currently viewing. [F1] returns the view to the default third-person camera.

Gunnery

#6 on the HUD shows the status of all of your guns. A green check mark means that the gun is ready to fire, a yellow arrow means that it is being reloaded, a red arrow means that it is damaged and being repaired, and a red "X" means that it is destroyed. The red bar under every gun icon shows how close the gun is to being loaded. Pressing the space bar in third-person view will automatically fire the guns at the nearest enemy. The number keys 1 through 4 allow you to select which components of the enemy ship are being targeted. The current subtarget is shown by the panel #7, with the subtargets, from the left, being the enemy's lifting body, the enemy's guns, the enemy's masts and rudders, and finally, his sails (note that currently, sails cannot be damaged).
If you are in any of the first-person views, guns are aimed manually - simply point in the direction you wish to fire, and press the space bar. Note that manual gunnery can be quite hard, as both your velocity and that of your enemy must be taken into account. For an added challenge, consider playing an entire game using only the first-person views.

Instruments and Wind

Your ship can travel at most perpendicular to the wind. The red arrow on your compass (#8) indicates the direction that the wind is blowing. Note that wind varies with altitude, so if you wish to travel in a certain direction, but the wind prevents you, ascend or descend to find a more favorable wind. You can also use the flag on the top mast to tell the direction of the wind. The altitude gauge (#9) tells you your altitude. When this gets too low, you will hit the water and sink.

The Objective

In the scenarios included with this demo, your objective is always to destroy all enemy ships. To accomplish this, you must damage them enough so that they will be unable to stay in the air and will sink into the ocean.

HUD Layout guide
Keyboard map

Acknowledgements

Content

All 3d models, textures, and sound in Airship Combat were created entirely by me with the tools described below.
The only exception to this is the sky texture, which was obtained from Philippe Hurbain's wonderful photography website, where he freely distributes his materials without license ("You are free to use it for any purpose...").
See his site for details.

Content creation

All 3d models which are not procedurally generated were created with Autodesk 3D Studio MAX 8.
All 2d textures were created with Paint Shop Pro 7, with the exception of the explosion and water textures, which were created in 3D Studio and then processed in Paint Shop Pro 7.
All sound effects are original recordings, with post editing done with Cool Edit Pro version 2.1 by Syntrillium Software.
All code and text editing was done with Microsoft Visual Studio 2002.

Algorithms

The collision detection system uses the following algorithms from Real-Time Rendering (Second Edition), by Tomas Akenine-Moller and Eric Haines:
Line-line intersection
Triangle-box intersection
OBB-OBB intersection
Triangle-triangle intersection
In addition, the sample code for "Fast 3D Triangle-Box Overlap Testing" by Akenine-Moller was used for reference in writing the triangle-box intersection test. This sample code can be obtained online.

3rd Party Libraries

The game uses OpenGL for 3D graphics.
Sound is done with FMOD Ex 4.04, which can be obtained from www.fmod.org.

Addition Acknowledgements

My roommate, for help and advice on sailing.
My family and girlfriend, for being so understanding of me when I couldn't find time to spare for them over Thanksgiving break 2006.