Tempest started as a class project which I then rewrote to utilize the new
functionality available with DirectX 9 as a means to learning the new
features in the API. It is designed to run on an ATI Radeon 9700, and does
not contain much in the way of fallback paths. I have not had the ability
to test the game on any other cards, but any card that adheres the DirectX 9
specification should work. The game is designed around trying to make high
level shader programming easily accessible as a means to controlling not
only render state but that of the objects it is used to render.
The main feature is an AssetManager class that is given paths to .fx files,
which it then loads, binds variables using a similar semantic to the DX 9
SDK EffectEdit sample. It will also load textures and models referenced by
the file, and provide a simple interface to rendering loaded meshes, which
providing a more robust interface for rendering arbitrary primitives while
managing the state internally through the Effects. This provides access to
the majority of methods through a simple high level control and frees the
programmer from the responsibility of having to create all of the required
texture and model objects by hand.
It does not currently contain various aspects usually found in games such as
spatial partitioning, as my goal with this demo was to focus more on
utilizing as much of the GPU's abilities as I could. Also, the format of
the levels is such that other methods become more efficient at determining
visibility, and avoiding the need for more complicated methods.
The track is constructed from two Catmull-Romm splines subdivided to a
specified level of detail. It aligns the cross-section spline along the
skeleton spline at each point and creates the skin of the object. Because
it is constructed from 2 splines, it can be parameterized with two
variables, giving a very simple way of updating positions of objects on the
track in a reduced parameter space and avoiding the need to collision detect
between the track and objects since they are fixed to it. It can convert a
parameterized position to a 3D transformation to render the model.
It utilizes various other DirectX 9 features, and contains such effects as a
projective texture headlight for the ship, intricate texturing methods
through dependant reads in the pixel shader pipeline, and using occlusion
queries for determining the state of various entities in the game and how
they react to the player.
The majority of the configuration is data-driven and a game can be setup
through a series of text files to configure the game state and effects files
to configure the render state.
I have not done much play balancing at the moment, as the game is more akin
to a visualization than a robust game. Though in my opinion it is quite
hypnotic. There are many things that can and should be optimized or made
more elegant. The game allows me to easily extend it to introduce new
entities and how they are rendered, which was the goal.
The source code will only run on a 9700 or comparable card, and is in some
serious need of documenting and cleaning before it is good enough to be
released. Please direct any inquiries to email@example.com.