A small first-person raycaster inspired by Wolfenstein 3D, built in C with a Xorg API library (minilibx). It renders a textured maze from a first-person perspective, parses a .cub scene file, and supports smooth window management and movement. This repository includes the bonus features: minimap and wall-collision handling.
- Ray-casting engine that draws a 3D view of a 2D map.
- Directional wall textures (N/S/E/W).
- Independant and customisable floor and ceiling colours (takes RGB values).
- Smooth rotation and movement with responsive keyboard controls.
- Graceful exit via
ESCor window closeXbutton. Extensively tested for memory leaks and robust execution. - Bonus: Minimap and Wall collisions on the bonus version of the project.
git clone https://github.com/Rapcampo/42_cub3D.git
make #builds the standard mandatory version
make bonus #builds the bonus version with minimap and collision
./cub3D maps/valid/test.cub
./cub3D_bonus maps/valid/test.cub #for the bonus build
- W / A / S / D — move the player in the maze.
- ← / → — use the arrow keys to rotate the camera left/right.
ESC- Quit the game.
The norm is set of rules stipulated by 42 for the pedagogical needs of the school. It enforces these rules through an open source tool called "Norminette", which the students can run to check if their code is complaint. Some of these rules are:
- No for, do...while, switch, case, goto, ternary operators and variable-length arrays are allowed
- Each function must be a maximum of 25 lines, not counting the function's curly brackets
- Each line must be at most 80 columns wide, comments included
- A function can take 4 named parameters maximum
- No assigns and declarations in the same line (unless static)
- You can't declare more than 5 variables per function
- 4 space tabulations
- and so on...
- Norminette - The tool to enforce the 42 style of coding.
- 42 Header - The header used by 42. To be used with Vim (or Neovim).