Skip to content

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.

Notifications You must be signed in to change notification settings

MarcoPicheca/Cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🇮🇹 ITALIANO

🧊 Cub3D - 42 School Project

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.

📚 Obiettivo del progetto

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

🛠️ Tecnologie Utilizzate

  • Linguaggio: C
  • Libreria grafica: MiniLibX
  • Sistema operativo: Linux
  • Altri strumenti: Makefile, cc

👨‍💻 Come provarlo dalla tua shell

  • $ make download per scaricare la miniLibX
  • $ make per la versione di base
  • $ make bonus per la versione con i bonus (animazioni e grafiche)
  • $ ./cub3d ./maps/<esempio>.cub o ./cub3d_bonus ./maps/<esempio>.cub sostituisci 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_libx per ripulire dai file oggetto e eliminare la miniLibX

vista iniziale con ./cub3d_bonus ./maps/<esempio>.cub: image

vista dalla mappa 2D: image

🇬🇧 English

🧊 Cub3D - 42 School Project

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.

📚 Project Goal

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

🛠️ Technologies Used

  • Language: C
  • Graphics library: MiniLibX
  • Operating system: Linux
  • Other tools: Makefile, cc

👨‍💻 How to try it from your shell

  • $ make download to download MiniLibX
  • $ make for the basic version
  • $ make bonus for the version with bonus features (animations and graphics)
  • $ ./cub3d ./maps/<example>.cub or ./cub3d_bonus ./maps/<example>.cub replace <example> with one of the maps in the ./maps folder
  • 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_libx to clean object files and remove MiniLibX

initial view with ./cub3d_bonus ./maps/<example>.cub: image

view from the 2D map: image

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •