sid.me

Home Blog Projects About

Prime Game Engine Optimizations

  • systems
  • engine
  • games

Game Engine Title Image

In Spring of 2025, I took the course “Game Engine Development”, taught by professor Artem Kovalovs, at University of Southern California. This post will outline the work done and summarize the learnings from that course.

Optimizing Rendering with Bounding Boxes & Frustum Culling

The Problem

By default, a game engine would render every renderable object in the scene - including all meshes and animations. All these objects are submitted to the graphics pipeline for rendering, which is quite inefficient considering that objects could be out of the field of view of the camera view, and can be ignored altogether.

Task

Implement an Axis-Aligned Bounding Box around all meshes and use a frustum culling technique to skip rendering of objects that are out of the camera view in the current frame.

Frustum Culling In the image, objects marked in red should not be rendered.

  • Calculate the camera-view coordinates of the mesh and draw a bounding box around it
  • Define the view frustum which is a pyramid-shaped region of 3D space
  • Test if the bounding box intersects with the frustum, even partially, and skip rendering if not

Building a Physics Subsystem: Gravity, Floor Detection, and Collisions

Implement two major physics components for the Prime Game Engine:

  • Floor detection and gravity calculation if object is in the falling state
  • Check for Collisions, and adjust the movement of the object appropriately

Animations

Support Full Body, Additive and Partial animations.

Final Project

Intention

Create an interactive and dynamic Demo for a physics system.

Tasks

  • The first step was to introduce a ball object into the game world. To make things more interesting, when the ball spawned a random impulse was also applied to it. This meant that instead of dropping straight down, the balls would scatter in random unique directions.

  • Next, I implemented sphere to sphere collision, to ensure balls don’t pass through each other and emulate real-world physics.

  • The second phase of this project involved creating a procedurally-generated mesh. This was done by creating triangles at regular intervals and applying Perlin Noise to add a gradient to the mesh and simulate peaks and valleys. This helps to show realistic terrain, similar to the real-world.

  • The final step of the project was to integrate the physics system with the procedural mesh. This meant the sphere-triangle collision case needed to be handled, and gravity needed to act along the slope of the mesh.

  • The complete demo can be found here:

Learnings

  • Optimization techniques that can be applied to improve render times for game engines, making the experience for players more smooth and interactive
  • Learning about many game engine modules, like Networking, Graphics, UI, Multiplayer, Animations, and Parallelism
  • Utilizing MS Visual Studio IDE, mainly for C++, as well as tools like AutoDesk Maya
  • Gaining industry insights from the professor, who is a full-time graphics engineer at a game company
  • Documenting and demoing features

One of the coolest classes I’ve taken so far at USC and a big recommendation for anyone interested in a systems level game course or just curious about how games are run under the hood. Artem is also very responsive, knowledgeable and cool :). He also provided industry insights and showed his contributions to The Last of Us, Part 2 game, through gameplay demos.