A top-down 3D space shooter built with Direct3D 11 and C++20, supporting 1–2 players with keyboard and Xbox controller input.
- Windows 10 or later
- Visual Studio 2019 (16.10+) or later with the C++ desktop workload
- CMake 3.20+
- Windows 10 SDK (no legacy DirectX SDK required)
Note: The project requires MSVC. MinGW/Clang are not supported due to D3D11 header and COM requirements.
- Open the project folder in Visual Studio or CLion with an MSVC toolchain.
- CMake will auto-configure, fetching DirectXTK and RapidCheck via FetchContent.
- Select Debug or Release and build.
mkdir build && cd build
cmake .. -G "Visual Studio 17 2022"
cmake --build . --config ReleaseOr with Ninja:
mkdir build && cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release
cmake --build .The build automatically copies Media/, config/, and shaders/ directories next to the executable.
cd build
ctest --output-on-failureNine property-based tests (using RapidCheck) validate math, rendering, and input logic.
Launch SpaceShooter3D.exe from the build output directory. The game opens a title screen where you choose 1-player or 2-player mode.
| Action | Keyboard | Controller |
|---|---|---|
| Navigate menu | Up / Down arrows | Left stick |
| Confirm selection | Enter | A button |
| Action | Keyboard | Controller (slot 1) |
|---|---|---|
| Move | Arrow keys | Left stick |
| Aim / Fire | Automatic (fires in movement direction) | Right stick |
| Action | Keyboard | Controller (slot 2) |
|---|---|---|
| Move | W / A / S / D | Left stick |
| Aim / Fire | Automatic (fires in movement direction) | Right stick |
| Key | Action |
|---|---|
| Escape | Quit / Back |
| F11 | Screenshot (saved as ScreenShot1.bmp) |
| Key | Action |
|---|---|
| F7 | Toggle debug camera |
| F8 | Toggle wireframe |
| F9 | Toggle bounding volumes |
Game settings are read from INI files in the config/ directory:
config/game.ini- general game settingsconfig/level.ini- level-specific parameters (speed, lives, etc.)
src/ - C++ source files
include/ - Header files
shaders/ - HLSL vertex and pixel shaders
Media/ - Game assets (meshes, textures, fonts)
config/ - INI configuration files
tests/ - Property-based tests (RapidCheck)
docs/ - Project documentation
docs/modernisation-2026.md- Detailed account of the D3D11 + C++20 migration (project history, what changed, before/after comparisons)
| Component | Technology |
|---|---|
| Graphics | Direct3D 11 |
| Shaders | HLSL (compiled at runtime via D3DCompile) |
| Math | DirectXMath (header-only, SIMD) |
| Mesh loading | DirectXTK (Model, SDKMesh/CMO) |
| Text rendering | DirectXTK (SpriteBatch + SpriteFont) |
| Keyboard input | Win32 GetAsyncKeyState |
| Controller input | XInput |
| C++ standard | C++20 |
| Build system | CMake 3.20+ with FetchContent |
| Testing | RapidCheck (property-based) |