Recreating and Old Skool shooter in DirectX 11/C++

Project Overview

This project was set by the university, as a way to improve C++ coding and to more advanced programming. The task was to create an old skool style FPS in Direct X 11 C++, in the style of games like Doom (1993), Quake, and the original Wolfenstien. This meant creating a game window from scratch and all the features necessary such as camera rendering, keyboard and mouse inputs, graphics rendering pipelines and shader coding, player movement, collision detection, creating a core game loop.
The graphics rendering pipeline was created for the game making use of Direct X's data structs for buffer and resources to store data appropriate to the swap chain. This meant that I can define a viewport and depth stencil for the window.
The Window was created through the a custom window class created through Microsoft Create window function, passing in window name and height. Then came defining Message handlers for different input types.

I created a pixel and vertex shader for handling the colour values of the pixels and for defining verticies on rendered objects. A index buffer allowed for more optimised draw calls as index vertices would be taken into account to avoid drawing them twice for neighbouring triangles.

The Game


The game is a classic FPS style recreation, with shooting and movement functionailty, it has billboarded enemy sprites and simple collision detection. It places the player in a simple environment that can be loaded and created through text files, which could be expanded into a level editor system. The system scans each line of a text file and when it finds specific characters it will place corresponding objects in place such as floor pieces, wall pieces, or enemies.


Code Snippets



Here you can find some examples of the code: