Skip to content

A simple 3D game engine using raycasting techniques to render a maze.

Notifications You must be signed in to change notification settings

pablovilchez/42-cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42 - Cub3d

42 School Git C Grade

Description

Cub3d is a project from 42 School that involves creating a 3D graphical representation of a maze using raycasting techniques in C. The goal of this project is to gain a deeper understanding of how raycasting works and to develop advanced programming skills in C and graphics programming.

Features

  • Real-time rendering of a 3D maze using raycasting.
  • Textured walls and sprites.
  • Player movement and collision detection.

Requirements

  • Unix-based operating system (Linux or macOS)

  • GCC compiler

  • MLX42 library for graphics (provided by 42 School)

  • In Linux:

    sudo apt install build-essential libx11-dev libglfw3-dev libglfw3 xorg-dev

Installation

  1. Clone the repository:

    git clone https://github.com/pablovilchez/42-cub3d.git
  2. Navigate to the project directory:

    cd cub3d
  3. Compile the project:

    make

Usage

Run the program by executing the following command:

./cub3d [map_file.cub]

Example

./cub3d maps/map.cub

Controls

  • Move forward: W
  • Move backward: S
  • Strafe left: A
  • Strafe right: D
  • Rotate left: Left arrow
  • Rotate right: Right arrow
  • Exit the program: ESC

Co-author

License

This project is licensed under the MIT License.

Acknowledgments

  • Thanks to 42 School for the project guidelines and support.
  • Special thanks to my teammate Davyd for his incredible effort, hard work, and for putting up with me throughout the project.