This project is a recreation of the classic Wolfenstein 3D game built using SDL2 and OpenGL. It features a raycasting engine to simulate 3D environments, dynamic text rendering for HUD elements, and smooth player movement and collision detection. The game combines SDL2 for input and window management with OpenGL for rendering.
- 🎮 2D Raycasting engine for 3D-like environments.
- 🌟 OpenGL-based rendering for enhanced graphics performance.
- 🧹 Clean and reusable SDL2 wrapper for better code management.
- 🕹️ Smooth player movement and collision detection.
- 🎶 Audio support with SDL_mixer for sound effects and music.
- C++ Compiler: GCC, Clang, or MSVC with support for C++11 or newer.
- SDL2: For window management and input handling.
- SDL_image: For rendering images.
- SDL_mixer: For audio support (sound effects and music).
- OpenGL: For rendering graphics (requires OpenGL 4.1 or newer).
- GLEW: For managing OpenGL extensions.
- GLM: For OpenGL math-operations.
-
Clone the repository:
git clone https://github.com/vaibhav-yerkar/Wolfenstein3D_Clone.git cd wolfenstein-3d-clone
-
Install dependencies:
- Linux (Debian-based):
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libglew-dev libglm-dev
- macOS:
brew install sdl2 sdl2_image glew glm sdl2_mixer
- Windows:
- Download SDL2 and SDL_image, SDL_mixer development libraries from their official websites.
- Configure your IDE (e.g., Visual Studio) with the include and library paths.
- Linux (Debian-based):
-
Build the project:
mkdir build cd build cmake ../ make ./wolfenstein3D
- W/A/S/D: Move forward/left/backward/right.
- E: Door Eject.
- Mouse Movement: Rotate the player.
- Mouse-left-buttom: GunFire Attack.
- SDL2: Window creation, input handling, and game loop management.
- SDL_image: image rendering .
- SDL_mixer: Audio support (sound effects and music).
- OpenGL: Rendering walls, sprites, and game objects.
- GLEW: OpenGL extension management.
- C++ Standard Library: Core utilities and STL.
-
Blank Screen:
- Verify the OpenGL context is initialized.
- Check if textures and shaders are loaded correctly.
-
Compilation Errors:
- Ensure all dependencies (SDL2, SDL_ttf, OpenGL, GLEW, SDL_mixer) are installed.
- Verify include and library paths for your compiler.
- 🔄 Improve collision detection for smoother gameplay.
- 💡 Add lighting effects and shading for realism.
- SDL2 and OpenGL communities for their excellent documentation and resources.
- The creators of Wolfenstein 3D for inspiring this project.
Feel free to update this file as necessary! 😊