Descent Engine

 
Description
This is a game engine inspired from one of my favorite game series, Descent and Descent 2. Levels are composed entirely of cube structures that do not need to be convex but do need to be non intersection.  Objects can be a mesh or a bill-board texture, textures can be opaque or transparent.

Collision detection is done by assuming every object is sphere. Object/Object collisions are then easy by checking to see if an object collides with another object that is in the current cube or an adjacent cube. Object/Level collisions are done by casting a ray from the object center in the direction opposite of the triangle's normal. Using planar intersections and determinants, it can be determined if the triangle is too far away to be hit by the sphere and, if not, to see if the ray hits the triangle. There is a degenerate case when an object collides right at the edge of two sides that make a point or sharp angle towards the object. Collision in this case is solved by finding the closest point on the edge to the center of the object and seeing if it is close enough to hit the sphere.

Robot AI is done with a mutli-tiered system. First are a set of actions that a robot can perform. These are elementary operations that a robot does on a single tick of the clock, such as move, rotate, fire, sleep, etc. Built off of these is a set of messages. A message defines a more complex operation, like move to a certain cube, destroy a target or get behind a target. These are operations that take some time to complete and utilize the set of actions during each frame. Finally, built off of the messages is some basic behaviors. Every robot has a message queue of things to do. A behavior is what fills this queue with messages. For example, the basic drone behavior simply looks for another opposing robot and enqueues the message to destroy. The system above is implemented, however at this time it is not used passed the point of finding another robot and killing it. Bosses are planned to have better behaviors than drones and would require a more advanced set of messages. Bosses could even have control of a certain set of robots and with its messages initiate them to do things that require the boss behavior to initiate.

The engine is written entirely in C and OpenGL with lots of macros that may or may not speed it up.                

Features

Still To Do

Known Bugs

In Action

Download

More screen shots, binaries, source and documentation can be found here.

 

Copyright Chris Becker 2001-2003 All Rights Reserved.