Teh Engine

Teh Engine is a graphics engine I wrote in C++ using OpenGL. I boasts many features but can also be considered as re-inventing the wheel. However I believe writing such a complex piece of software is a 'rite of passage' for anyone seriously interested in computer graphics and creating well designed code.

I have been nurturing this project for many years and it has come to underpin many of my experiments. It's so much easier filling in the stub for a new entity class and its associated renderer than creating a basic test application from scratch. A pretty console, dynamic runtime variables, still/video capturing, timers, profiling and many other useful features are therefore thrown in for free!

So far I have used it for:

Humble Beginnings (AKA THE Game)

For the tutorials of the second-session-first-year C course, I joined the advanced tutorial where we decided our end-of-term goal would be to create a little networked game. hat high hopes we had... (And I still haven't taken down the message board.)

The screenshot is of my client rendering a test level using OpenGL. The scene is actually a 3DS MAX example illustrating its luminosity features. I converted the export to my own (simplistic) level file format that the client deals with.

DS (AKA Driving Simulator)

This is "THE Game Mk II"! concocted with my 'partner in crime' Xianhang "Hang" Zhang. There's ~20k lines of code after I coded for about 2 weeks straight.

The aim was to write quite a general engine but head toward the theme of a Driving Simulator. Under the bonnet sits TEH ('TEH Extremely Hardcore') Engine. If you would like to learn more about the nitty-gritty at this stage, please watch the video of the demo.

The clickable screenshots above show (from left to right): a level consisting of a simple terrain, the car and spheres demonstrating collision handling of the physics engine (which, by the way, works properly now - that beautiful hack has been removed so now you can sit at an angle on the terrain and, if you really want to, crash into spheres and flip yourself), rendering detail of the jeep with directional and velocity vectors visible, the pretty console featuring auto-completion via DynamicConfig (see next paragraph) reporting that the MeshRenderer is using some OpenGL extensions to increase framerate and two-player split-screen mode.

You may have noticed three other features in the screenshots: in the top right-hand corner is situated the timer window (displaying real-time, time-stretch, virtual-time, frame-rate, and timer latency), across the bottom of the window scrollls the profiler graph (the various colours representing the proportion of time spent rendering the UI, the 3D world, calc'ing physics...), and finally in the bottom left-hand corner is the debug window controlled with the 'show' command (this stringifies an object using a dynamic data-binding system I wrote called DynamicConfig).

No doubt there's still a lot of work to be done, so we'll be hacking away at it over time... Next on the agenda is writing the AnimationController that effectively plays back an animation from 3ds max.

Presentation Day

This is the presentation we gave to demonstrate Teh Engine during the final Computer Graphics lecture in front of a full lecture hall of ~300 students.

(Thanks Ashley "Mac-man" Butterworth for operating the camera.) Please excuse my 'ah's and 'um's - it happens when I'm really tired. Was up for >48 hours.

It should be noted that I fixed the physics so the car behaves properly. Please read the previous page for more detail about the engine.

DS with Correct Physics!

Shortly after the presentation day, I ripped out the original physics code that someone (who shall not be mentioned!) had written in the minutes prior to the presentation and replaced it with more 'physically correct' code:

DS: Teh Engine (with proper physics!)
Uploaded by balint256