The SGX Engine - SGX

Cross-platform Components OS-Dependent Libraries Platform-specific Code
SGX Domains Platform Utilities Drivers(common) Libraries Drivers (platform-specific) Skeleton
This is the common, cross-platform, code. It contains all the routines necessary to create a game, but without platform-specifics. Consequently, you can not run a game using the SGX code alone, as it needs a platform driver to implement functionality such as the graphics, sound, and the filesystem. The components featured are as follows:

Core

Everything depends on the core. This includes the basic type definitions for the engine, along with general-purpose math code, memory management, standard libraries (for string handling, random numbers, etc) and time functions.

Some components of the core require additional code to work. These include the time module (which needs platform-specific driver code to retrieve the current time), and XML (which requires an externa library.)

This is the only dependancy of the engine. While other components depend on core, there is no co-dependancy on any other component.

The libraries are:

  • crc - Cyclic redundancy check.
  • helpers - Error/warning tracers, memory watchers.
  • math - Matrix, vectors, basic (and not so basic!) geometry.
  • memory - Memory management.
  • platform - Platform-statistics.
  • regex - Regular expressions. Uses embedded PCRE.
  • settings - Simple handler for generic engine settings.
  • sgxlib - Sorting, random numbers, string, and utility libraries.
  • stl - An abstraction that allows use of the standard implementation, or STLport
  • time - Game and systems clock handling, plus high resolution timers for profiling.
  • types - Abstractions of the basic types used.
  • xml - XML parsing. Requires an external library.

Audio

This is a well-featured audio playback engine which handleswith distance attenuation, and 3D positioning. It doesn't feature DSP functionality, but provides hooks to the low-level driver should you need to support it. The Wintel32 driver currently uses FMOD.

Collision

A cross-platform component which makes heavy use of the core/math code to interpret collisions in-world. (Not currently included.)

Filesystem

An abstraction of the native filesystem (requires platform-specific driver code) for reading and interpeting the disc. It uses the idea of a mounting filesystem, so each level on disc can be mounted under the same path, for example, to ensure a smooth game workflow. This also makes it trivial to transparently provide language- and platform-specific resources to the game, since you only need to mount a different directory.

Graphics

What most people consider "the engine". This is a functional 2D and 3D engine with forward-facing sprites (aka billboards), meshes (with md2-format animations), and full texture management. It is essentially a polygon-pusher, but provides hooks for more involve visual effects.

Depends on the graphics domain code.

Input

In additional to basic keyboard, mouse, and joypad abstractions, this code includes a high-level mapping system whereby you can assign an action to a particular input event (e.g. stick 1 moves left). Changing input systems, or moving platforms, then requires a remap only of this assignment, and not a change in game code.

Networking

A basic abstraction of the sockets network code. (Partially complete.)

Scripting

A set of interfaces to utilise external scripting libraries. Lua is provided as an example.

System

This requires a platform-specific driver to implement the abstractions provided here for remove execution, thread yielding and so on.

Video

Again, this exists solely as a set of interfaces for external libraries.

GUI

A skinnable GUI system supporting radio buttons, check boxes, frames, hotspots, images, text and buttons.

Valid HTML 4.01 Transitional