Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cub3D

Cub3D is a simple raycasting engine inspired by the classic Wolfenstein 3D game. This project is part of the 42 curriculum and demonstrates the implementation of a 3D graphical representation of a maze using the raycasting technique.

Features

  • Raycasting Engine: Renders a 3D perspective from a 2D map.
  • Texture Mapping: Supports different textures for North, South, East, and West walls.
  • Floor and Ceiling Colors: Customizable colors for floor and ceiling.
  • Player Movement: Smooth movement (WASD) and rotation (Arrow keys or Mouse).
  • Map Parsing: Reads .cub configuration files to load maps and settings.
  • Map Validation: Ensures the map is closed/surrounded by walls and contains valid characters.
  • Collision Detection: Prevents the player from walking through walls.
  • Minimap: (If implemented) Displays a 2D view of the map.

Technologies Used

  • C Language: The core implementation language.
  • MLX42: A cross-platform graphics library used for window management, rendering, and input handling.
  • Libft: A custom C library containing useful standard functions.

Installation and Usage

  1. Clone the repository:

    git clone https://github.com/izaydeh/Cub3D.git
    cd Cub3D
  2. Build the project:

    make
  3. Run the game:

    ./cub3D maps/good/subject_map.cub

    (Replace maps/example.cub with the path to your map file)

Controls

  • W / A / S / D: Move the player.
  • Left / Right Arrow: Rotate the camera.
  • ESC: Exit the game.

Authors

Name Intra ID Github
Ismail Khalil ikhalil izaydeh
Mousa Hasoneh mhasoneh mossaJehad

Project Structure

  • src/: Source code files.
  • include/: Header files.
  • libft/: Libft library.
  • MLX42/: MLX42 graphics library.
  • maps/: Example map files.
  • textures/: Texture assets.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages