G-Engine is a hobby/passion project of mine that I started developing in 2017. It is complete C++ rewrite of the engine for Gabriel Knight 3: Blood of the Sacred, Blood of the Damned, a 3D adventure game released in 1998 by Sierra Studios.

A cool discovery was how incredibly data-driven GK3 is, even with most of the gameplay logic being implemented using a custom scripting language. As a result, you could theoretically write an engine that’s able to parse the various data files bundled with the game to “recreate” the experience in a newer engine.

GEngine Screenshot

Besides how much I enjoy the original game, a primary motivation behind this project is to improve my C++ skills and become more familiar with the internal workings of a 3D game engine.

Since starting, I have implemented the following features:

  • A math library with common math functions, vectors, matrices, and quaternions
  • Opaque and translucent rendering of 3D geometry
  • Opaque and translucent BSP geometry rendering
  • Key-framed vertex animation
  • A compiler for the game’s custom scripting language, Sheep, built using Flex and Bison, which parses the language grammar into byte code
  • A virtual machine capable of executing custom Sheep scripts OR pre-compiled Sheep scripts packaged with the original game
  • Game loop, input, and delta time calculations using SDL
  • A component-based game object model
  • Sound effect, music, and VO playback using FMOD
  • Unit tests using “Catch” framework
  • Binary parsers for proprietary assets for 3D meshes, vertex animations, and BSP, which required reverse engineering with Hex Fiend

There’s still a lot of work to do, but I’m happy with what’s been implemented thus far! Feel free to grab the code from the public repo (linked at the top of this post) to try it out, assuming you have the data files!

I am also accompanying development of this engine with occasional blog posts - you can find a complete list here.

comments powered by Disqus