The C4 Engine is a computer game engine created by Terathon Software that can
be used to develop games for Windows (XP and Vista), Mac OS X (version 10.5),
and the PlayStation 3 game console.
Development
The C4 Engine possesses the unique quality among commercial game engines that it
was programmed entirely by one person, computer graphics author Eric Lengyel.[1]
Although in development sporadically for several years beforehand, the engine
was first made available under a commercial license in May, 2005. Since then, C4
has been under continuous development, and approximately 15 updates have been
released each year since its debut.[2]
Technology
The architecture of the C4 Engine is that of a layered collection of software
components,[3] in which the lowest layers interact with the computer hardware
and operating system, and the higher layers provide platform-independent
services to the game code. While a considerable portion of the engine is
dedicated to 3D rendering, there are also large components dedicated to
functionality pertaining to audio, networking, and input devices.
Graphics
Scenes rendered with the C4 Engine use a combination of several different types
of light sources and shadowing methods.[4] The primary method for rendering
dynamic shadows is stencil shadow volumes, but the engine also supports shadow
mapping for static light sources.
Shaders are created in C4 by specifying a set of material attributes instead of
the actual shader code required by the graphics driver. The engine internally
generates the necessary shader code for each combination of material and light
type that it encounters when rendering a scene. Material attributes can be used
to produce effects such as normal mapping, parallax mapping, horizon mapping,
and bumpy reflections or refractions.
The engine is capable of rendering a large variety of special effects, including
particle systems, procedural fire, electrical effects, volumetric fog, and
weather phenomena.[5] During a post-processing stage, the engine can also apply
full-scene cinematic motion blur to the final image using a technique based on a
velocity buffer.[6]
Audio
The C4 Engine can play sounds stored in the WAV format using 16-bit mono or
stereo sampling, and audio data can be played from memory or streamed from disk.
The engine plays sounds using a custom mixer that provides capabilities such as
frequency shifting, Doppler effect, reverberation, and atmospheric absorption.
Networking
Multiplayer gameplay in C4 is supported by a two-layer messaging system that
uses the UDP protocol to communicate among different computers connected to a
game.
Tools
The C4 Engine ships with a number of tools that are essential for the
development of a game. Each tool is packaged as a plugin module that exists
separately from the engine itself. Many tools make use of the comprehensive
graphical user interface system provided by the engine so that a consistent
interface is presented to the user across multiple platforms.
World Editor
The World Editor tool is a 3D content creation application that is typically
used to create game environments for use with the C4 Engine. It provides a large
set of drawing and manipulation capabilities that are used to construct world
geometry as well as many game necessities such as lights, sounds, triggers, and
special effects.[7]
The World Editor can import scene information through the COLLADA format. This
enables the use of content from a large number of digital content creation
programs such as Maya or 3D Studio Max.
Script Editor
The World Editor tool includes a graphical script editor designed to be
accessible to artists and level designers as well as programmers. The script
editor, shown in the image to the right, allows the user to drag various
“methods” into a tree representing action dependencies and the order of
execution.[8]
The engine ships with several standard script methods that perform simple
actions such as enabling or disabling a scene node (for example, to turn a light
on or off). New script methods can be defined by the game code, and they appear
in the script editor as new actions that can be used by a level designer.
Panel Editor
The World Editor tool includes a sub-editor called the “panel editor” that
allows the creation of 2D interface panels that can be placed inside a 3D world.
The panel editor, shown in the image to the right, lets the user place image
items and text items in a panel effect node that is rendered as part of the
scene.[9] Panels can also include a special camera item that displays the scene
that is visible to a camera placed anywhere else in the same world.
Interface panels are both dynamic and interactive. The engine provides an
extensible set of “mutators” that can be applied to individual panel items to
induce various forms of animation such as scrolling, rotation, or color change.
A character in a game can interact with a panel by approaching it and clicking
the mouse inside interactive items. Script can be attached to such items,
causing a sequence of actions to occur when the player activates them.
Licensing
There are four types of commercial licenses available for the C4 Engine.[10] The
standard license costs $350 (US) per user and is available to independent
developers who do not receive funding from a major publisher. Publisher-funded
development studios are required to purchase a professional license.
For the development of applications outside the realm of entertainment, a
serious games license is offered. A serious games license for the C4 Engine has
been acquired by Lockheed Martin.[11]
Lastly, an educational site license is available to institutions that wish to
use the C4 Engine for instructional purposes. The C4 Engine has been licensed by
Georgia Tech, Worcester Polytechnic Institute, McMaster University, and the
University of Kempten.[11]
Each license includes the complete source code to the engine, sample games, and
tools. All future updates to the engine are included with every license at no
additional cost. Products created with the C4 Engine are required to display the
“Powered by the C4 Engine” logo.