menu

Rey Engine

Introduction

My C++ game engine has a DirectX11 rendering pipeline and VR support using OpenXR. The engine has math and physics utilities, a UI System and other engine systems required for 2D and 3D games. I've developed several games using this engine including 2D and 3D games (ReyTD, Vaporum, SimpleMinerVR, Doomenstein) and a virtual reality level editor.

Duration: Aug 2023 - Present

Technologies: C++ | DirectX11 | FMOD | OpenXR

Role: Sole Developer

Key Features

  • Reusable systems for 2D and 3D rendering, sprite sheet animations, UI, audio, input using keyboard, mouse and up to 4 Xbox controllers, networking and virtual reality integration.
  • Math, physics and raycast utilities with unit tests and visual tests.
  • DevConsole, EventSystem, multithreading, heatmaps support
  • 3D model loading from OBJ and MTL files.
  • OBJ parser written from scratch with support for model groups and multiple material files.
  • XML parsing and custom binary file reading/writing.
  • Virtual Reality integration using OpenXR.

Games Developed using my C++ Engine

Math Utilities

While developing my engine, I wrote several math and physics functions, and often wrote visual tests to ensure that these functions worked as I expected them to.

  • My math utilities include commonly-used math classes including Vec2, Vec3, Vec4, Matrix (Mat44) and EulerAngles.
  • The engine also has functions for raycasts vs different primitive shapes in 2D and 3D, and a special raycast vs a tile grid.
  • It contains functions for easing curves, cubic bezier curves, cubic hermite curves and Catmull-Rom splines.

Dev Console and Event System

The engine contains a dev console that can be used to type and execute commands through the EventSystem.

  • Both the DevConsole and the EventSystem are thread-safe, using atomic templates for primitive data types and mutexes for objects.
  • Game code can subscribe to additional events not included in the engine and these will show up in the dev console.
  • The dev console maintains a list of DevConsoleLine structures that include the text, a color and metadata including the frame number and timestamp for the message.

UI System

Rey Engine implements its own custom UI system that allows the creation of widgets including text, image, buttons and text input fields.

  • My UI system consists of a root widget that widgets without a parent specified use as the parent.
  • The root widget is initialized with the dimensions of the viewport and all other widgets use normalized coordinates for position and dimensions relative to their parent.
  • Widgets can be parented to other widgets, allowing simple widget groups.
  • The system can be used to easily create custom widgets such as popups, ensuring that widgets behind popups cannot be interacted with.
  • Support for keyboard, mouse and VR or any requested combination of these.