A C++ game project built with SDL3, GLM, and other libraries.
GhostEscape/
├── GhostEscape/ # Main project directory
│ ├── src/ # Source code
│ │ ├── Core/ # Core game classes (Game, Scene, Object)
│ │ ├── Common/ # Utility functions
│ │ ├── main.cpp # Entry point
│ │ ├── SceneMain.cpp # Main scene implementation
│ │ └── SceneMain.h # Main scene header
│ └── vendor/ # Third-party libraries
│ ├── SDL3-devel-3.2.24/ # SDL3 core library
│ ├── SDL3_image-3.2.4/ # SDL3 image loading
│ ├── SDL3_mixer/ # SDL3 audio mixing
│ ├── SDL3_ttf-3.2.2/ # SDL3 font rendering
│ ├── glm/ # OpenGL Mathematics library
│ ├── imgui-docking/ # Dear ImGui (UI library)
│ └── box2d-main/ # Box2D physics engine
├── premake5.lua # Premake build configuration
├── generate_project.bat # Script to generate Visual Studio project
└── README.md # This file
- SDL3: Window management, rendering, input handling
- SDL3_image: Image loading (PNG, JPG, etc.)
- SDL3_mixer: Audio mixing and playback
- SDL3_ttf: Font rendering
- GLM: Mathematics library for vectors and matrices
- Box2D: Physics engine (available but not currently used)
- Dear ImGui: Immediate mode GUI (available but not currently used)
-
Premake5: Download from https://premake.github.io/download.html
- Place
premake5.exein the project root directory
- Place
-
Visual Studio 2022: With C++ development tools installed
-
Generate Project Files:
generate_project.bat
Or manually:
premake5.exe vs2022
-
Open in Visual Studio:
- Open
GhostEscape.slnin Visual Studio 2022 - Select Debug or Release configuration
- Build the solution (Ctrl+Shift+B)
- Open
-
Run the Game:
- The executable will be in
bin/Debug-windows-x64/GhostEscape/orbin/Release-windows-x64/GhostEscape/ - All required DLLs are automatically copied to the output directory
- The executable will be in
- Game: Singleton class managing the main game loop, SDL initialization, and scene management
- Scene: Base class for game scenes with camera support
- SceneMain: Main game scene implementation
- Object: Base class for all game objects
- Utils: Static utility functions for rendering
- Scene-based architecture
- Camera system with world coordinates
- Grid rendering system
- Boundary drawing utilities
- Singleton game instance pattern
- SDL3-based rendering pipeline
- The project uses C++17 standard
- All paths in premake5.lua are relative to the project root
- DLLs are automatically copied to the output directory during build
- The project is configured for x64 architecture only
-
"premake5.exe not found":
- Download premake5 from the official website
- Place the executable in the project root directory
-
Missing DLLs:
- Ensure all vendor libraries are properly extracted
- Check that the premake5.lua paths are correct
-
Build Errors:
- Verify Visual Studio 2022 is installed with C++ tools
- Check that all include directories in premake5.lua are valid
When adding new source files:
- Add them to the
filessection inpremake5.lua - Regenerate the project files with
generate_project.bat - Rebuild the solution in Visual Studio