Skip to content

This is the "cub3D" project of the 42 School core curriculum. The goal was to create a raycaster in C (wolfenstein3D clone).

License

Notifications You must be signed in to change notification settings

lschrafstetter/42_cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cub3d

This is the cub3D project of the 42 curriculum. A wolfenstein3D clone to practice working in openGL and learn raycasting.

image

How to use it (Linux or macOS):

How to play:

  • ./cub3D maps/mc.cub or (longer loading because of bigger texture files) ./cub3D maps/lsd.cub (TRIGGER WARNING: EPILEPSY!)
  • movement: wasd
  • rotation: arrow left/right or mouse
  • open doors: e
  • end: esc

The task was to create a wolfenstein3D clone / raycaster with the following features:

  • a 3D game with movement (forward/backwards, strafing, rotation) with wasd (rotation error keys)
  • 4 different wall textures which differ according to the direction they are projected at (no/ea/so/we)
  • floor and ceiling color can be changed in the map file
  • customizable map in map file (space: empty, 0: floor, 1: wall, N/E/S/W: player, D: door)
  • player can start with four different orientations (no/ea/so/we)
  • map error handling (no open maps, number of players = 1, etc.)
  • following BONUSES were added:
  • wall collision / wall gliding
  • doors which can open and close
  • rotation via mouse
  • minimap

Disclaimer: This project was created as a school project with the strict 42 "Norminette" norm, including:

variable declarations at the beginning of the file no declaration and initialization on the same line only while loops allowed only 25 lines per function only 5 functions per .c file no comments inside of functions more minor things...

About

This is the "cub3D" project of the 42 School core curriculum. The goal was to create a raycaster in C (wolfenstein3D clone).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published