Cub3D è un progetto della Scuola 42 che consiste nel creare un semplice motore 3D basato su raycasting, ispirato al classico gioco Wolfenstein 3D. Utilizza la libreria grafica MiniLibX per la visualizzazione e si concentra su performance, gestione dell’input, rendering e progettazione software.
- Implementare un motore di raycasting 3D in C.
- Gestire una mappa 2D che rappresenta un mondo 3D.
- Visualizzare il mondo tramite una proiezione prospettica.
- Integrare controlli da tastiera per muoversi nel mondo.
- Aggiungere texture e dettagli per migliorare il realismo.
- Linguaggio: C
- Libreria grafica: MiniLibX
- Sistema operativo: Linux
- Altri strumenti:
Makefile,cc
- $
make downloadper scaricare la miniLibX - $
makeper la versione di base - $
make bonusper la versione con i bonus (animazioni e grafiche) - $
./cub3d ./maps/<esempio>.cubo./cub3d_bonus ./maps/<esempio>.cubsostituisci con una delle mappe presenti nella cartella ./maps - GIRARE PER LA MAPPA CON: "WASD" spostamento sulla mappa, left/right arrows per muovere la visuale
- VERSIONE BONUS: sparare con "SPACE", aprire/chiudere i portali con "E", aprire/chiudere minimappa con "M" e visiual 2D con "V"
- USCIRE: "ESC" o la 'x' in alto a destra
- $
make fclean ; make rm_libxper ripulire dai file oggetto e eliminare la miniLibX
vista iniziale con ./cub3d_bonus ./maps/<esempio>.cub:

Cub3D is a project from 42 School that consists of creating
a simple 3D engine based on raycasting, inspired by the classic
game Wolfenstein 3D. It uses the MiniLibX graphics library
for rendering and focuses on performance, input handling,
rendering, and software design.
- Implement a 3D raycasting engine in C.
- Handle a 2D map that represents a 3D world.
- Display the world through perspective projection.
- Integrate keyboard controls to move around the world.
- Add textures and details to improve realism.
- Language: C
- Graphics library: MiniLibX
- Operating system: Linux
- Other tools:
Makefile,cc
- $
make downloadto download MiniLibX - $
makefor the basic version - $
make bonusfor the version with bonus features (animations and graphics) - $
./cub3d ./maps/<example>.cubor./cub3d_bonus ./maps/<example>.cubreplace<example>with one of the maps in the./mapsfolder - MOVE AROUND THE MAP WITH: "WASD" to move, left/right arrows to rotate view
- BONUS VERSION: shoot with "SPACE", open/close portals with "E", toggle minimap with "M", toggle 2D view with "V"
- EXIT: "ESC" or the 'x' in the top-right corner
- $
make fclean ; make rm_libxto clean object files and remove MiniLibX
