- Operating System: Windows 10 (64-bit) or later
- Processor: x64 CPU with SSE2 support
- Memory: 8 GB RAM minimum, 16 GB recommended
- Storage: 5 GB available space (including build artifacts)
- Graphics: OpenGL 3.3+ compatible graphics card
- Operating System: Windows 11 (64-bit)
- Processor: Modern x64 CPU with AVX support for SIMD optimizations
- Memory: 32 GB RAM for large projects and fast compilation
- Storage: SSD with 10+ GB available space
- Graphics: Modern graphics card with OpenGL 4.6+ support
- Edition: Community, Professional, or Enterprise
- Required Workloads:
- Desktop development with C++
- Required Components:
- MSVC v143 - VS 2022 C++ x64/x86 build tools (latest version)
- Windows 10/11 SDK (latest version)
- C++ CMake tools for Visual Studio
- Git for Windows (if not already installed)
- Version: 3.16.0 or later (3.20+ recommended)
- Installation: Download from cmake.org
- Configuration: Add to system PATH during installation
- Version: Latest stable version
- Installation: Download from git-scm.com
- Configuration: Configure user name and email
- Purpose: Lightweight editor for documentation and shader editing
- Extensions:
- C/C++ Extension Pack
- CMake Tools
- GitLens
- Purpose: Faster builds (alternative to MSBuild)
- Installation: Via Visual Studio installer or standalone
- Usage:
cmake -G Ninjafor generation
- Purpose: Package management for future dependencies
- Status: Will be integrated in future versions
-
Download Visual Studio 2022
- Visit visualstudio.microsoft.com
- Download Visual Studio 2022 Community (free) or your preferred edition
-
Run the Visual Studio Installer
- Launch the downloaded installer
- Select "Desktop development with C++" workload
- Ensure the following individual components are selected:
- MSVC v143 - VS 2022 C++ x64/x86 build tools (latest)
- Windows 10/11 SDK (10.0.19041.0 or later)
- C++ CMake tools for Visual Studio
- Git for Windows (if not separately installed)
-
Complete Installation
- Click Install and wait for completion
- Restart computer if prompted
-
Download CMake
- Visit cmake.org/download/
- Download the Windows x64 Installer
-
Install CMake
- Run the installer
- Important: Select "Add CMake to the system PATH for all users"
- Complete the installation
-
Verify Installation
cmake --version
Should output CMake version 3.16.0 or later
-
Set User Information
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
-
Configure Line Endings (Windows)
git config --global core.autocrlf true
-
Open Command Prompt or PowerShell
cd C:\Development # or your preferred directory git clone https://github.com/yourusername/Pyramid-Engine.git cd Pyramid-Engine
-
Verify Repository Contents
dirShould show directories like
Engine/,Examples/,docs/, etc.
-
Open Visual Studio 2022
-
Open Folder
- Select "Open a local folder"
- Navigate to the cloned Pyramid-Engine directory
- Click "Select Folder"
-
CMake Configuration
- Visual Studio will automatically detect CMakeLists.txt
- Wait for CMake generation to complete (watch the Output window)
- If prompted, select "x64-Debug" configuration
-
Build the Engine
- Wait for IntelliSense indexing to complete
- Select Build → Build All (Ctrl+Shift+B)
- Monitor the Output window for build progress
-
Build Success
- Look for "Build succeeded" in the Output window
- Build artifacts will be in
build/directory
-
Open Developer Command Prompt
- Start Menu → Visual Studio 2022 → Developer Command Prompt for VS 2022
-
Navigate to Repository
cd C:\Development\Pyramid-Engine -
Generate Build Files
cmake -B build -S . -G "Visual Studio 17 2022" -A x64 -
Build the Engine
cmake --build build --config Debug
Or for Release build:
cmake --build build --config Release
-
Open Developer Command Prompt
-
Generate with Ninja
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Debug
-
Build with Ninja
cmake --build build
- Purpose: Development and debugging
- Features: Debug symbols, no optimization, full logging
- Usage: Default for development
- Command:
cmake --build build --config Debug
- Purpose: Production builds and performance testing
- Features: Full optimization, minimal logging, no debug symbols
- Usage: Final builds and benchmarking
- Command:
cmake --build build --config Release
- Purpose: Performance profiling and release debugging
- Features: Optimization + debug symbols, balanced logging
- Usage: Performance analysis and release testing
- Command:
cmake --build build --config RelWithDebInfo
- Purpose: Minimal size builds
- Features: Size optimization, minimal features
- Usage: Distribution builds where size matters
- Command:
cmake --build build --config MinSizeRel
Configure build options using CMake variables:
cmake -B build -S . ^
-DPYRAMID_BUILD_EXAMPLES=ON ^
-DPYRAMID_BUILD_TESTS=OFF ^
-DPYRAMID_BUILD_TOOLS=OFF ^
-DCMAKE_BUILD_TYPE=Debug| Option | Default | Description |
|---|---|---|
PYRAMID_BUILD_EXAMPLES |
ON |
Build example projects |
PYRAMID_BUILD_TESTS |
OFF |
Build unit tests |
PYRAMID_BUILD_TOOLS |
OFF |
Build development tools |
PYRAMID_ENABLE_SIMD |
ON |
Enable SIMD optimizations |
PYRAMID_ENABLE_LOGGING |
ON |
Enable logging system |
PYRAMID_ENABLE_PROFILING |
OFF |
Enable profiling hooks |
Set environment variables to customize the build:
set PYRAMID_SHADER_PATH=C:\Development\Pyramid-Engine\Assets\Shaders
set PYRAMID_ASSET_PATH=C:\Development\Pyramid-Engine\Assets
cmake -B build -S .After a successful build, you'll find:
Pyramid-Engine/
├── build/
│ ├── bin/
│ │ ├── Debug/
│ │ │ ├── BasicGame.exe
│ │ │ ├── BasicRendering.exe
│ │ │ └── *.pdb files
│ │ └── Release/
│ ├── lib/
│ │ ├── Debug/
│ │ │ ├── PyramidEngined.lib
│ │ │ └── glad.lib
│ │ └── Release/
│ └── CMakeFiles/
└── ... (source files)
PyramidEngined.lib- Debug build of the enginePyramidEngine.lib- Release build of the engineglad.lib- OpenGL loading library
BasicGame.exe- Basic game exampleBasicRendering.exe- Rendering showcase example
*.pdb- Debug symbol files (Debug configuration only)*.ilk- Incremental linker files
-
Navigate to Build Directory
cd build\bin\Debug -
Run Basic Game
BasicGame.exe
-
Expected Output
- Window opens with 3D scene
- Colored cube rotating with camera movement
- Console output showing engine initialization
-
Run Basic Rendering
BasicRendering.exe
-
Expected Output
- Window with rotating cube
- Lighting effects and material animations
- Performance statistics in console
Problem: CMake cannot find Visual Studio or tools
CMake Error: CMAKE_C_COMPILER not set
Solution:
- Ensure Visual Studio 2022 is properly installed with C++ workload
- Use Developer Command Prompt for VS 2022
- Verify CMake is in PATH:
cmake --version
Problem: Cannot find Windows SDK
Error: Windows SDK version 10.0 not found
Solution:
- Open Visual Studio Installer
- Modify Visual Studio 2022 installation
- Select latest Windows 10/11 SDK
- Install and restart
Problem: OpenGL loader compilation fails
Error: Cannot find OpenGL headers
Solution:
- Ensure graphics drivers are up to date
- Verify OpenGL support:
OpenGL Extensions Viewer - Check Windows SDK installation
Problem: Cannot debug the engine
Warning: Cannot find or open PDB file
Solution:
- Build Debug configuration:
cmake --build build --config Debug - Ensure PDB files are in same directory as executables
- Check Visual Studio debugger settings
Problem: Executable crashes on startup
The application was unable to start correctly (0xc000007b)
Solution:
- Install Microsoft Visual C++ Redistributable 2022
- Ensure all DLL dependencies are available
- Run from Developer Command Prompt
Problem: Graphics initialization fails
Error: Failed to create OpenGL context
Solution:
- Update graphics drivers to latest version
- Verify OpenGL 3.3+ support in graphics card specifications
- Run
dxdiagto check graphics capabilities
Problem: Poor framerate or stuttering
Warning: Frame time spike: 50.0 ms
Solution:
- Build Release configuration for performance testing
- Ensure VSync is properly configured
- Check GPU utilization and thermal throttling
- Verify no background applications are interfering
Improve Build Times:
- Use Ninja generator:
cmake -G Ninja - Enable parallel compilation:
cmake --build build -j 8 - Use SSD for source and build directories
- Increase RAM allocation for Visual Studio
Incremental Builds:
- Use Visual Studio's incremental build features
- Avoid cleaning unless necessary
- Build specific targets:
cmake --build build --target BasicGame
Debug vs Release Performance:
- Debug builds are significantly slower due to optimizations being disabled
- Always use Release builds for performance testing
- RelWithDebInfo provides a good balance for profiling
SIMD Optimizations:
- Ensure SIMD is enabled:
-DPYRAMID_ENABLE_SIMD=ON - Check CPU feature detection in logs
- Verify compiler optimizations are enabled
Create custom build configurations for specific needs:
# Custom configuration for profiling
set(CMAKE_CXX_FLAGS_PROFILING "-O2 -g -DPYRAMID_ENABLE_PROFILING=1")
set(CMAKE_C_FLAGS_PROFILING "-O2 -g -DPYRAMID_ENABLE_PROFILING=1")Future support for cross-compilation to other platforms:
# Example for future Linux cross-compilation
cmake -B build-linux -S . ^
-DCMAKE_TOOLCHAIN_FILE=cmake/Linux-Cross.cmake ^
-DPYRAMID_TARGET_PLATFORM=LinuxFuture integration with package managers:
# Future vcpkg integration
cmake -B build -S . ^
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmakeThe repository will include GitHub Actions for automated building:
# .github/workflows/build.yml (example)
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v1.12
- name: Configure
run: cmake -B build -S .
- name: Build
run: cmake --build build --config ReleaseAfter successfully building the engine:
- Run Examples: Try the example projects to understand the engine
- Read Documentation: Explore the API reference and architecture docs
- Create Your First Game: Follow the Getting Started guide
- Join the Community: Participate in discussions and contribute
If you encounter issues during building:
- Check Documentation: Review this guide and the troubleshooting section
- Search Issues: Look through GitHub Issues for similar problems
- Ask for Help: Create a new issue with:
- Your operating system and version
- Visual Studio version and components
- CMake version
- Full error messages and logs
- Steps to reproduce the problem
If you'd like to improve the build system:
- Understand CMake: Familiarize yourself with CMake best practices
- Test Changes: Ensure changes work across different configurations
- Documentation: Update this guide when making changes
- Pull Requests: Submit improvements via GitHub pull requests
For more information about contributing, see Contributing.md.