C++ version of the engine