3D Game Engine

Self Development

When: Jan - Jun, 2024

This Game Engine project started as a Ubisoft NEXT competition entry and evolved into a space to explore game engine techniques and practices. It has several render pipelines implemented; two OpenGL pipelines with and without custom GLSL scripts, and an entirely self-made render pipeline using matrix calculations.

Showcasing:

  • Matrix and Quarternion Calculations

  • Physics

    • Collisions

    • Octree

    • Orbits

    • Gravity wells

    • Space & Planet Surface States

  • Render Pipeline Implementation

    • OpenGL

    • GLSL

    • Full Projection Pipeline Calculations

  • Memory Management

Demo

Development:

I was wrapping up my CS degree when I took my last non-mandatory course: Computer Graphics. This course covered all elements needed to properly develop 3D software using techniques like texture mapping, lighting methods, ray tracing, quaternion and matrix calculations, and GPU programming using OpenGL and GLSL. But the most important thing this course did was that it simply got me to set up tools running on my machines so that I could start exploring these techniques independently.

With my graduation close at hand I decided to focus on the Ubisoft competition that I had heard about as a member of the UofT game developers club. The competition guidelines stated that I could not use external libraries such as FreeGlut or GLEW however, I did not need all functionalities of GLEW to run a sufficient 3d engine so I built my own OpenGL utility library called GLTape. At this point, I was still within the competition rules and I built my engine understanding seeing as gl.h is an internal library.

All of my plans were thrown into disarray on the morning of the competition when it was announced that we weren't permitted to use any OpenGL functions, even ones included in internal libraries. I had sufficiently developed my math utilities library so I decided to build my own 3d render pipeline and use the line drawing function the competition provided to draw the outlines of the spherical bodies. Unfortunately, I was not able to make the pipeline work in the 20 hours I allocated from my 40 total hours and missed the deadline. My mistake was that I overscoped in attempting to develop a perspective projection matrix and I struggled far too long on skewing my circles when I should have just pivoted to an orthographic projection.

Ultimately I’m really proud of my component-based architecture. There were still several rough edges from being developed in a competition context that needed to be smoothed out. And I’ve had a fun time getting this project to a place where I can show off my engine development aptitude. This current build is about as far as I plan on taking this engine as I plan to rebuild the engine using Vulkan as this will better prepare me for industry practices.

Inspiration:

I've been immersing myself in game development knowledge since I was 14, this project feels like a culmination of what I've heard developers talk about over the last 10 years. In this scenario, as I set out to develop my own engine, I was predominantly inspired by three projects:

Architecture: Unreal Engine's UObject system and memory management

Physics: Nintendo's approach to gravity wells and colliders

Rendering: Sebastian Lague's work on implementing Raymarching shaders to display geometrically defined bodies.

Unreal Community Wiki Article

Sebastian Lague Youtube Video: Raymarching Coding Adventure

Explore The Project

  • Source Code

    Explore The Public Repository