Game Engine Editing Tool for the Car~ Engine with wxWidgets
This project involved developing several aspects of a game engine, along with a widget based user interface via wxWidgets. The program uses adaptive grid drawing algorithms for the background grid, frame management (both wxWidgets, and adaptive version), and OpenGL / DirectX context management (allowing the user to switch between renderers – this is not yet implemented). The original design was inspired by Epic Games UDK (UE3), and has since been redone to resemble something closer to UE4.
The content browser was designed to make use of the native operating system’s ability to manage files (just as is done in UE4), where the browser provides the user with an interface to the OS file management system and feedback with usable data. New content can be added via the generic import feature (file extensions are attributed to specific resource types), or creation of a new resource asset (an import prompt is then presented). Once the content has gone through the import / creation stage, it is saved in a binary format specific to the resource type. The binary file contains basic header information, such as the resource type, the date created, and any characterization flags set (e.g. architecture, props, ambient sounds, etc.). Depending on the resource type, a preview thumbnail may also follow the header (e.g. this will be true for textures, but not for sounds).
In addition to creation of files via the browser, the browser will periodically traverse the local directory adding and removing any files that have been added or removed from the OS file manager. This means that content can be easily imported from other projects by simply copying and pasting the files via the OS file manager. Additionally, the browser will create directories, allow for file / directory renaming, and re-parenting (moving to a new parent directory).
Specific resource import and editing is managed by a resource manager specific to the resource type. The managers are implemented via the Interface-Inheritance design pattern, in which the interface exposes the relevant functionality that is needed by the content browser. Additionally, a dynamic content database is used for loading resources indexed by a unique 32 bit hash-ID. The content database consists of two parts: 1) a listing of all resources in the local and engine directories (may not be loaded), and 2) storage of the loaded resources for editing and use by the engine / editor. The two methods are implemented via a Hash table and a red-black tree, respectively.
The browser allows for various display modes, providing quick feedback to the user in regards to the content type and status. A brief synopsis of individual items are presented via mouse-over, and will present a context specific menu under a right click action. Additionally, the user can specify streaming information of individual content items (stream, persistent, load-use-unload, and disable compile).
Aside from visualization and content management, the content browser is responsible for final asset compilation into data files that can be ready by the game engine. This final asset compilation is done by the specific content managers, where unneeded meta-data is removed and the assets are compressed to their engine resource state. The content browser is responsible for distributing and packing the content into specific resource files, as well as creating an asset index file, and preforming any outer compressing (i.e. zip).
Additionally, the Autodesk FBX API was used in this program, to allow for high information model files to be exported from any of the Autodesk products directly into the editing tool.
The overall design was inspired by Epic Games Unreal Editor 3 and Unreal Editor 4. Specific features in the interface were taken from each to produce the most streamlined effect possible. The content manager is designed to import native formats (such as .jpg, .fbx, .obj, .swf) and reinterpret them into a binary format that is more friendly to the engine. The binary formats are then saved along with several other items in a custom binary package format (effectively and object dump). Upon load, the editor will search for packages on a list, and load the resource table appended to the beginning of each package file. The resource tables are then stored into a content database which is a simplified, self implemented version of mySQL, based on Ternary Tries, Binary Trees, and dually-linked lists. The plan for the editor is to allow the user to load and modify content into the game engine, but not require them to actually construct physical levels (streaming or persistent). This enables script based content generation, while providing a friendly GUI for content management (Think Sid Meier’s Civ V 5, but instead of doing everything with .dds import atlases and .XML files, one can use the content browser, and bake a package).