Skip to content

MossaJehad/Cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧱 Cub3D

A simple 3D ray-casting engine written in C using MLX42.
This project is inspired by Wolfenstein 3D and was built as part of the 42 School curriculum to explore low-level graphics, math, and game engine design.


🚀 Features

  • 🧭 First-person 3D view using ray-casting
  • 🗺️ Map parsing from .cub files
  • 🎨 Textured walls and environments
  • 🧍 Player movement and rotation
  • 🧱 Collision detection
  • 🌗 Minimalistic graphics engine built on MLX42
  • 🧩 Custom libft for utilities and memory management

🗂️ Project Structure

Cub3d/
├── include/        # Header files
├── libft/          # Custom library
├── maps/           # Example map files
├── src/            # Source code
├── textures/       # Wall and floor textures
├── Makefile        # Build instructions
└── README.md

⚙️ Build & Run

Requirements

  • GCC or Clang
  • make
  • MLX42 (included or linked in project)

Build

make

Run

./cub3D maps/example.cub

🧠 Learning Objectives

  • Understanding ray-casting math
  • Managing player view and angles
  • Parsing custom map formats
  • Using MLX42 for pixel rendering
  • Writing clean, modular C code

📜 License

This project is for educational purposes (42 School).
You are free to explore, learn from, or adapt it for your own studies.


✨ Author

Mossa Jehad
GitHub Profile

About

A simple 3D ray-casting engine written in C using the MLX42 library - inspired by Wolfenstein 3D. Built for the 42 School Cub3D project, featuring texture mapping, player movement, and custom maps.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors