Click the GitHub image to view the projects source code.
For my Program 3D Application units, the aim of the unit was to make a small game using DirectX in C++. My idea was to create a small basic game which the user would control a cube, and catch on-coming cubes.
To understand DirectX, thorough research was conducted to understand how the graphics pipeline works for this specific API.
The artefact uses many different aspects of DirectX and 'physics based' approaches in terms of collision. The project started with a standard 2D triangle. With research and (a lot of) trial and error, I had successfully implemented a depth buffer, which allows the pipeline to render 3D geometry by storing depth information used by Direct3D.
With the DirectX ToolKit, I was able to load in custom textures and assign them to the cubes within the project.
To make a functioning game of some sort, implementing collision was the most important part. By creating a bool function, I check the direction of the cubes on each axis (X, Y, Z), and stating that if one of the conditions is true, the whole boolean function will return true. Firstly, the direction of each cube is compared to the opposite one, and then if they collide, push away by a set amount of units to stop them passing through.
As an added bonus, I added in a converter that outputs the in-game score and outputs that to a .CSV file once the timer hits 0.
Artefact Prototype
Completed Artefact
For project planning, I created 3 diagrams which show's the different aspects of the projects data flow, project management & game flow. All of which can be seen below


