Welcome to Cub3D, a project inspired by the classic game Wolfenstein 3D! This project is a raycasting game engine implemented in C, using the MiniLibX library for graphics. The goal is to create a simplified version of the game engine capable of rendering 3D environments from a 2D map.
Cub3D is a project that explores the fundamentals of raycasting and graphics rendering. It reads a map file representing a 2D maze and renders a 3D perspective of the environment in real-time. The project also includes features like texture mapping, sprite rendering, and basic collision detection.
- Raycasting Engine: Cub3D implements a basic raycasting engine to render 3D environments from a 2D map.
- Texture Mapping: Textures are applied to walls and sprites to enhance the visual experience.
- Map Parsing: The project reads a simple map file to generate the game environment dynamically.
To run Cub3D on your local machine, follow these steps:
To build and run Cub3d on macOS, you need the following dependencies installed on your machine:
- MiniLibX (mlx): A simple X-Window (X11) programming API for rendering graphics.
For macOS, you can use Homebrew to install the necessary packages:
Install Homebrew (if not already installed):
bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Clone this repository to your local machine:
git clone [email protected]:oumaima-aarabe/Cub3D.git
2.compile the source code using make or make bonus to get all features
3.To run the Cub3D game, execute the following command in your terminal:
./cub3d path_to_map_file.cub
W
: Move forwardA
: Strafe leftS
: Move backwardD
: Strafe rightQ
: Rotate leftE
: Rotate rightESC
: Exit the game you can use the mouse too to move in bonus