The sge universe
Contents
Introduction
This site exists to give you an overview of all the libraries and projects related to the graphics engine sge and also to give you some pointers on where to look if you want to get involved.
History
After meditating over Stroustrup's great tome "The C++ programming language" for over 9000 years, Freundlich started a one-man C++ project to develop some sort of "space game." Initially using Windows and DirectX, he quickly hacked together something useful. But in a one-man project, it's hard to keep motivating yourself.
So about a year after its inception, Phillemann joined sge and the project developed more quickly. Some time later, they both agreed to work on a game called sanguis together. This time, however, it wasn't supposed to be a space game. It was supposed to be a down shooter in the style of Crimsonland or violetland. This is when nille joined the team as a graphics and sound artist. During the development of sanguis, it became apparent that sge was too monolithic. A lot of the functions and concepts were too general to be in a graphics engine. For example, sge had a logging facility, a math library and so forth. So a decision was made to move the general stuff to a new library, fcppt. Later on, a few other libraries were spawned, like awl and mizuiro.
Developers
Philipp Reh a.k.a. Freundlich (founder and main developer of libawl, mizuiro, sge and sanguis)
Phillemann (main developer of sge and fruitcut)
Philosophy
There are a lot of graphics engines out there. Most prominently, there are irrlicht and ogre. But those aren't the only ones. So, should I choose sge over those two? The answer is: it depends.
It's often a little hard to define how a library stands out among others. sge's focus, however, is pretty clear. It's supposed to be an engine written in standards-compliant, exception-safe, memory-leak free, modern C++ that offers at least a low-level API to the usual tasks involving a game engine.
To that end, sge is developed on multiple platforms on multiple compilers
and with rigid warning settings. Exception safety is guaranteed by sticking to
the RAII principle, providing
scoped_ classes for everything that's supposed to end when the
scope ends. Also, sge uses all of C++'s features where appropriate, so a
standards-compliant compiler is assumed. The boost library is heavily used in the project, as
well as tr1.
We also try to avoid common anti-patterns such as the singleton pattern, or designing needlessly huge base classes (consider ogre's node or scene node class, for example). Conversely, we try to keep our code clean using the named parameter idiom, strong typedefs, small (atomic) headers, using namespaces and strictly separating the hpp and cpp files (function definitions all inside the cpp file, not inlined inside the class).
What does sge offer?
- A complete renderer interface with backends for DirectX (in development) and OpenGL (considered mature). There's a really nice (modern C++y) abstraction layer over vertex buffers. There is, however, no shader abstraction if you want to be independent of HLSL or GLSL.
- A very abstract, yet optimized sprite system supporting point sprites.
- The ability load truetype fonts (via freetype plugin) and bitmap fonts with an interface which is agnostic as to what specific type of font you're using.
- An audio subsystem supporting streaming sounds (for background music) and non-streaming sounds. With loaders for wave and Ogg/Vorbis and with an OpenAL player backend.
- Abstractions for timers
- Parsers for json and ini files.
- A plugin system, bundled with well-thought interfaces allowing you to easily write new backends and loaders.
Drawbacks
- For all libraries except fcppt, there's no documentation available. The projects are too volatile to provide documentation, so instead we try to keep the header files as clean and descriptive as possible.
- Few high-level abstractions are available. Thus, sge is targeted primarily at users wanting to write portable code, but who do not want to mess with OpenGL, DirectX, OpenAL etc. themselves.
Contact
You can find us on github (links below) and in the IRC-Channel #sge-sanguis on Freenode (irc.freenode.net).Project Overview
| Name | Description | git repository |
|---|---|---|
| sge | The graphics engine, featuring the stuff you see above | git://github.com/freundlich/spacegameengine.git |
| fcppt | Freundlich's C++ toolkit with a generic math library, additional containers (like a tree structure), boost replacements, ... The fcppt's homepage for more information (and an extensive documentation). | git://github.com/freundlich/fcppt.git |
| mizuiro | A replacement for boost::gil, but far superior. It's a library to define color formats, convert between them as well as for creating color images and applying generic algorithms to them. | git://github.com/freundlich/mizuiro.git |
| awl |
A library allowing the portable creation of windows as well as receiving window events (sge uses it to create and manage windows, but it depends only on boost and fcppt, so it can be used separately) |
git://github.com/pmiddend/libawl.git |