3D Engine Design - 1st Stage Prototype
From the original Xaede archive. This is historical writing, preserved in a new reading edition. Technical advice, tools and project status reflect the time of publication.
In order to explore the OpenGL API and become more familiar with graphics library conventions and capabilities, the first prototype was implemented in the C programming language using the OpenGL Utility API (GLUT) for access to windowing-system calls. This initial GLUT prototype explored the creation and usage of triangle-, square- or “quad”-, and vertex-list-based polygon objects and primitive models.
Essentially, it provided a platform for implementing different lighting models, simple texture application, and a primitive skeletal-based animation system. Also, managing user input was explored, and a simple console-based user-interface was implemented. Use of the keyboard to initiate object manipulation on the X, Y, and Z coordinate planes as well as the three-aspect rotation was also implemented.
Lessons learned from this prototype implementation include learning that GLUT has many limitations that essentially render it useless for implementing a game-engine. Setting up multiple lights in OpenGL is easy, however always anticipating all of the resulting effects is not. Using different rendering techniques, such as blending and alpha-filtering need to be further explored. Using polygon object models based upon complex polygons – e.g. vertex listing – is much slower to render with current hardware and software in current graphics libraries than triangle- or quad- based polygon models. Implementing a skeletal animation system is fairly easy, creating a good API for using that system within the game engine source will be a non-trivial exercise.
Project Statistics:
Language: C (lines of code: 1,986)
External libraries used: OpenGL, GLU, GLUT
Modules created:
- frame rate
- lighting
- graphics engine prototype
- black and white tiled floor static render
- user-interface (keyboard driver, console system)
- models (cube model, sphere model, generic polygon model
- skeletal animation system