Code Samples

In each section on this page you will find a download link for a zip file containing a code sample and a brief description about the code you will see in the files within the archive.

Transform

Download Transform

These files contain the interface and implementation for a simple 2D transformation class that uses glm for vector and matrix containers and operations. The Transform class features the ability to create matrices for translations, scalings, and 2D rotations. It also features the ability to have parent and child relationships with other instances of the transform class. On top of this, the class also comes with unique syntax options that can be used to modify the translation, scale, and rotation properties of the matrix.

Rendering Pipeline

Download Rendering Pipeline

In these files, you will find a RendererPool class and a Renderer class. These classes were built in order to solve the problem of rendering multiple spaces to a screen. For example, most games have a HUD which is displayed over the actual game. In the engine this pipeline was built for, that HUD would be in a different space than the space that the game is in. This rendering pipeline makes it possible to render one space on top of another using one static RendererPool class and multiple Renderer instances. If you would like to see more about the engine these files are used for, you can find it on the X-Craft page. It was built specifically for the game.

Object Allocator

Download Object Allocator

At DigiPen, there is one assignment that is infamous among students for being extremely lengthy. This assignment is the Object Allocator, but it also goes by the name of memory manager since that's what it is. This memory manager aims to replace malloc() and free() or new and delete and instead use a custom system for managing memory. The Object Allocator still uses new and delete for creating a freeing memory pages, but besides this, the Object Allocator manages everything in a memory page on its own.