|
ExoEngine 3D Game Engine |
|
|
Contents 1. Introduction 2. How the Engine Works 3. Online Documentation 4. Source Code and Binary Downloads 5. Change Log |
For my fourth year computer
graphics course I wrote a little 3D engine using C# and the .NET platform.
I decided to go this route as opposed to the C++ route that everyone else took
in the course because I wanted to see whether C# lived up to it's hype.
Surprising, after writing about 600kB of code in C# it seems like it is a decent
language after all and possibly an effective replacement for C++ even in the
demanding field of real-time 3D game development. When I compare C# to C++
I find it's best features are garbage collection, less convoluted syntax and
true object orientation. It was a class requirement that I use OpenGL
instead of DirectX / Direct3D.
Just a quick disclaimer before I go too far: please remember that this is just an old one-term university project thus don't get your expectations too high.
The included compiled binaries for both the math
library and the OpenGL wrapper are compatible with Visual Basic .NET and Visual
C++ .NET development projects.
2 How
the Engine Works
While this engine used the CsGL OpenGL/C# library created by Lloyd Dupont, I recommend using the more modern Tao OpenGL Framework for future OpenGL-C# work. The Tao Framework did not exist when I built this 3D engine.
This 3D engine imports it's level/worlds data from the
popular Worldcraft
editor . Strangely, Worldcraft outputs it's world/level data in sets
of bounding planes which define the contours of solid objects. Thus one
has to convert the bounding plane sets into their respective sets of polygons.
The resulting set of faces is then quickly optimized to remove hidden or
redundant
faces created by adjacent objects. Then this face set is converted into a
binary space partition tree (commonly called a "BSP tree") representation
for both collision detection purposes and efficient visibility calculations.
There is also some auxiliary code that recognizes specifically defined entities
in the Worldcraft data such as the animated pond and the duck sprites.
This engine allows for polygons to be rendered using
reflection mapping,
(fake)
Phong shading, Gouraud shading, outline pencil drawing or just simple flat shading. The engine uses
reflection mapping to get the somewhat realistic look of the pond's waves. The
(fake) Phong shading is used on the ducks in order to achieve the smoothly rounded
look -- the primary effect of Phong shading (usually called specular reflection)
is the viewer/camera dependent white highlights.
Also of interest is the inclusion in this engine of a fairly full featured 3D math and geometry library. Just check out the project called Exocortex.Geometry3D.
4 Source
Code and Binary Downloads
Complete
Source Code (1.326 MB)
Includes all source code for engine
including both the Cg wrapper library and the C# OpenGL library based on
Lloyd Dupont's
CsGL library.
ExoEngine
Installer (932 kB)
NOTE: Installer requires that you have
already installed Microsoft .NET Framework v1.1. If you don't yet have it
you can download it
here. If you want to make use of the Cg shaders you must also install
NVIDIA's Visual Studio.NET Cg Toolkit. It is available
here.