EngineX is the custom-built game engine created by Eurocom for Sphinx and the Cursed Mummy. The first game that released based on this technology was Buffy: Chaos Bleeds —in 2003— due to shorter development times. Eurocom reused and expanded it for all of the following projects until its eventual bankruptcy in 2012. The last in-house game using this technology was 007 Legends.
The engine was made to be generic and extendable from the start, completely decoupling each game's code from the reusable, common EngineX code that works as base and abstracts the underlying platform. Still, some game code was also reused to some degree and expanded between projects. For example, Buffy and Sphinx share most of the HUD code; with the main menu and memory card dialog elements being almost functionally identical.
The entire engine and game is written in a mix of self-contained data-oriented and object-oriented C++ without any external dependencies, C++ Standard Library or middleware other than any required basic platform support for input, graphics, audio, threading or C runtime. It implements its own allocator arenas and data structures like intrusive linked lists, RTTI or strings. It supports asynchronous file IO, a virtual hashcode-based filesystem and makes heavy use of singletons, virtual functions and composition. It sports its own stack-based gamescript bytecode interpreter.
Sphinx and EngineX are both big pieces of software. The entire codebase without external dependencies or EuroLand code is around 1,256,936 lines of actual code, not counting comments or whitespace. Much bigger than some other games at the time, and with comparatively few comments to understand what is going on. To put the numbers in context,
cloc shows that Doom 3 amounts to around 593,899 lines.
The original version of the engine at the time of Sphinx supported the following platforms:
- PlayStation 2
- Windows (DirectX 7, internal)
After the THQ Nordic acquisition the original version was partially rewritten and expanded to work on the following platforms:
- Windows (OpenGL Core / SDL2 / OpenAL Soft), Linux, macOS
- Nintendo Switch
A more modern version of EngineX —reddubbed EngineXT— was the final incarnation used from 2005 onward. It was incrementally updated to support 7th generation consoles, as well as proper Windows support:
- PlayStation 3
- Xbox 360
- Windows (Direct3D 9)
- Wii U
The following is a non-comprehensive list of the games that are known to use this in-house technology.
The GeoFile revision number is used to ensure that data is exported with a specific version of EuroLand that matches the current EngineX version. They need to be in sync so that the inner structures and format of the writer and reader are compatible. Debug versions of the game will politely ask to re-export the EDB file with a newer EuroLand version.
|Year||Title||Filelist version||EDB/GeoFile version||Hashcodes shipped with game||Platforms|
|2003||Sphinx and the Shadow of Set Demo Disc||4||156||No||✓|
|2003||Buffy the Vampire Slayer: Chaos Bleeds||5||170||No||✓||✓||✓|
|2003||Sphinx and the Cursed Mummy||182||Yes||
|2004||Spyro: A Hero's Tail||7||240||No||✓||✓||✓|
|2005||Predator: Concrete Jungle||250||✓||✓|
|2006||Ice Age 2: The Meltdown||252||Yes||✓||✓||✓||✓||✓|
|2007||Pirates of the Caribbean: At World's End||Yes||✓||✓||✓||✓|
|2008||Beijing 2008||10||190 (||No||✓||✓||✓|
|2008||The Mummy: Tomb of the Dragon Emperor||7||253||Yes||✓||✓|
|2008||007: Quantum of Solace||255||✓|
|2009||Ice Age: Dawn of the Dinosaurs||260||No||✓||✓||✓||✓||✓|
|2009||Dead Space: Extraction||262||Yes||✓||✓|
|2009||Spider-Man 4 (cancelled prototype)||263||Yes||✓|
|2010||Vancouver 2010||10||239 (||✓||✓||✓|
|2011||Disney Universe||13||244 (||✓||✓||✓||✓|
|2011||GoldenEye 007: Reloaded||263 (||✓||✓|
|2011||Harry Potter for Kinect||333 (||✓|
|2012||007 Legends||11||335 (||✓||✓||✓||✓|
- Main article: EuroLand
EuroLand —sometimes stylized as Euroland— was the internal all-in-one editor used by the company, it was tightly integrated with custom Maya and 3ds Max plugins to edit maps and geometry. After Sphinx, the company started a new iteration called EuroLand 2, with a revised scene format and improved tools.
The original 2003 version of EuroLand as used to export Sphinx levels was released as part of of the Authoring Tools DLC in early 2018, together with a Redux version, recompiled and tweaked from source during the THQ Nordic port, adding PNG support as well as many other improvements. This version originally exported gamescripts incorrectly, causing several EDB levels not to load. Albeit it was later fixed in a subsequent DLC update.
After re-saving an ELF with Redux the original tool will not be able to load them due to MFC serialization differences, throwing spurious out of memory errors.
Hashcodes are an integral part of how EngineX works. Instead of referencing objects by name or path, almost every object is tagged with an unique hexadecimal number. To make this number easier to read, they have a constant label starting with the
Both EngineX, EuroLand, and the game itself load and parse a header file called
hashcodes.h, where all these special numbers are defined in order. Hashcodes can be created directly from EuroLand.
A number is always made out of a section number (the prefix) and a self-incrementing ID. Here is an example:
- Every EuroLand file is tagged with a hashcode of the
HT_Filesection. If we open
Grafix/Animations/Main Player/MC_Sphinx.elfin EuroLand and click on Project to open Project Options > Hash Table we can see that it uses
- Once we export that file via App Targets > PC > right-click menu > Output (Optimised) the .EDB will retain the tag. An entry in Filelist.bin will map it to its exported .EDB counterpart. So when the game finds the hashcode in
LevelDatait will redirect it to
_bin_PC/MC_Sphin.edband the game will load it.
But not only .EDB files use hashcodes; from individual entities, textures, to animation datums, bone names or music tracks. All of them have their own unique tags (either manually-typed or generated).
And while a few of them are hardcoded to be used internally by the engine, some of them are not.