Skip to content

Komu211/cub3d

 
 

Repository files navigation

🚀 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.5%
  • Makefile 5.5%