Skip to content

Matesant/Cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cub3d

Imagem 1 Imagem 2

Our first Ray cast

This repository contains the second graphical project of the 42 curriculum, developed using MinilibX. This project was a collaborative effort with Alisson Marcos.

About

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.

Challenges

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

Requirements

The functions are written in C language and need the gcc along with some graphical libraries..

$ sudo apt-get install libx11-dev libxext-dev

Instructions

1. Compiling the archives

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

For mandatory:

$ make

2. Cleaning all binary (.o) and executable files (.a)

To delete all files generated with make, go to the path and run:

$ make fclean

Usage

  • after compiling, run:
$ ./cub3d assets/maps/minecrat_lib.cub

Maps

You can create your oun maps!

to do so, you will need:

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published