Welcome to the cub3d project. This project is a 3D engine inspired by the classic game Wolfenstein 3D. The bonus part of this project includes additional features and enhancements over the mandatory part. This README will guide you through the steps to compile and run the bonus part of the project, including key bindings for an immersive gameplay experience.
Before compiling the project, you need to set up the mlx library used for rendering. Follow these steps:
Navigate to the mlx library directory:
cd bonus/libs/mlx_linux
Configure the mlx library:
./configure
Compile the mlx library:
make all
To compile the bonus part of the cub3d project, follow these steps:
From the root directory of the project, run the following command to compile the bonus part:
make bonus
This command will compile all the necessary files and generate an executable named cub3d.
After compilation, you can run the project by executing the generated binary:
./cub3d maps_testing_progress/good/preview.cub
Move Forward/Backward: W and S keys
Strafe Left/Right: A and D keys
Rotate View: Left and Right arrow keys or move the mouse
Shoot: Left mouse click
Open/Close Doors: E key
To clean up the object files and the executable, you can use the following commands:
To remove object files:
make clean
To remove object files and the executable:
make fclean
Re-compiling If you need to re-compile the project (for example, after making changes to the source code), you can use the following command:
make re bonus
This command will clean up the previous compilation and compile the project again.