Skip to content

Latest commit

ย 

History

History
113 lines (77 loc) ยท 3.06 KB

File metadata and controls

113 lines (77 loc) ยท 3.06 KB

๐Ÿš€ Cub3D - 3D Raycasting Engine

License Stars Issues 42 Project

A 3D maze renderer using raycasting techniques inspired by Wolfenstein 3D

๐Ÿ“‹ Table of Contents

๐Ÿ“– Overview

Cub3D is a graphics project that implements a simple 3D game engine using raycasting techniques. The project renders a 3D maze from a 2D map, allowing players to navigate through the environment with a first-person perspective. It's inspired by the groundbreaking game Wolfenstein 3D and developed as part of the 42 school curriculum.


โœจ Features

  • โœ… Textured walls with different textures for each wall direction (North, South, East, West)
  • โœ… Player movement (forward, backward, left, right) and camera rotation
  • โœ… Collision detection with walls
  • โœ… Map parsing from configuration files (.cub)
  • โœ… Customizable resolution and textures
  • โœ… Minimap display
  • โœ… Animated sprites
  • โœ… Openable doors

๐ŸŽฎ Demo

Cub3D Demo


๐Ÿ”ง Installation

  1. Clone the repository:
    git clone https://github.com/ondbeh/cub3d.git
  2. Navigate to the project directory:
    cd cub3d
  3. Compile the project:
    make

Requirements

  • GCC compiler
  • Make
  • MLX42 library (included ad a submodule)
  • X11 libraries (for Linux) or Cocoa (for macOS)

๐Ÿ“š Usage

Run the program with a map file:

./cub3d maps/map.cub

Map Configuration

The .cub file should contain:

Map Symbols

Symbol Description
1 Wall
0 Walkable space
NSEW Player starting position
D Door (closed)
Empty space (not walkable)

๐Ÿค Contributing


๐Ÿ“ž Contacts

GitHub

Email

LinkedIn


๐Ÿ“œ License

This project is licensed under the MIT License - see the license file for details.