Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ondbeh/cub3d

Open more actions menu

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

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.