This repository contains the second graphical project of the 42 curriculum, developed using MinilibX. This project was a collaborative effort with Alisson Marcos.
In this project, we are tasked with creating a game similar to Wolfenstein that employs ray casting. The goal is to develop a 3D perspective game within a 2D plane by implementing ray casting techniques.
- User Input Validation: Ensure that user input is properly validated and handled.
- Map Validation: Verify the integrity and correctness of the map used in the game.
- Ray Casting Logic: Implement the logic to cast rays and render them in a way that simulates a 3D perspective.
- Texture Mapping: Apply textures to enhance the visual appearance and realism of the game.
The functions are written in C language and need the gcc
along with some graphical libraries..
$ sudo apt-get install libx11-dev libxext-dev
To compile the project, go to its path and run:
For mandatory:
$ make
To delete all files generated with make, go to the path and run:
$ make fclean
- after compiling, run:
$ ./cub3d assets/maps/minecrat_lib.cub
You can create your oun maps!
- A Closed Environment: The program will generate an error if the map is open (i.e., if it lacks boundaries).
- Textures: Provide textures of your choice. In the map archive, specify SO, NO, WE, and EA with the paths to PNG texture files.
- Floor and Ceiling Colors: Define the colors for the floor and ceiling. Use F for the floor color and C for the ceiling color, with values ranging from 0 to 255.
- Character Conventions: Adhere to the following map characters:
CHAR | OBJECT |
---|---|
1 | Wall |
N | Player facing north |
E | Player facing east |
W | Player facing west |
S | Player facing south |
0 | Floor |