Skip to content

This project is inspired by the world renowned Wolfenstein 3D, the first FPS ever created. It will allow you to explore ray-casting.

Notifications You must be signed in to change notification settings

Javisanchezf/42Malaga-cub3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cub3D

School 42 Project - Graphic design using Ray-Casting technique.

This repository contains all the files for the cub3D project in the School 42 curriculum.

About

The cub3D project is a graphic design project that utilizes the Ray-Casting technique to create a 3D representation of a maze. The project aims to develop a basic understanding of ray-casting, as well as graphic rendering using the MiniLibX library.

You can find more information in the project subject.

The code in this repository follows the rules of the Norminette.

This is the result of the program:

Requirements

The project is written in C language and requires the following:

  • Compiler gcc.
  • Standard libraries:
    • <stdlib.h>
    • <unistd.h>
    • <math.h>
    • <fcntl.h>
  • MiniLibX Library

Installation

1. Download the repository

To download the repository, open a terminal and run:

git clone --recursive https://github.com/Javisanchezf/42Malaga-cub3d.git
cd 42Malaga-cub3d

2. Compiling the program

To compile the program, go to its path and run:

make

3. Running the program

To run the program, use the following command:

./cub3D maps/galaxy.cub

Usage

  • The program reads a scene description from a .cub file.
  • The controls allow you to navigate through the 3D maze.
  • Explore the maze and enjoy the ray-casting graphics!

Features

  • Basic ray-casting engine.
  • Textured walls and sprites.
  • Player movement and rotation.
  • Map parsing from a configuration file.
  • Configurable resolution and textures.
  • Mouse rotation control.
  • Doors that can open and close.
  • Hidden final chest

Controls

  • W A S D - Move forward, left, backward, right.
  • Arrow keys - Rotate the view.
  • SPACE - Open the doors.
  • 0 - Active mouse control.
  • 1 - Desactive mouse control.
  • Esc - Close the program.

Bonus

  • Additional features implemented in the bonus section.
  • Check the subject for details.

Authors

  • Names: Javier Sánchez | Antonio Delgado
  • 42 Logins: @javiersa | @antdelga

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

You are free to:

  • Share: copy and redistribute the material in any medium or format.
  • Adapt: remix, transform, and build upon the material.

Under the following terms:

  • Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • NonCommercial: You may not use the material for commercial purposes.
  • ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

Share the content!

About

This project is inspired by the world renowned Wolfenstein 3D, the first FPS ever created. It will allow you to explore ray-casting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published