Skip to content

This project is inspired by the world-famous eponymous 90's game, which was the first FPS ever. It will enable you to explore ray-casting. Your goal will be to make a dynamic view inside a maze, in which you'll have to find your way.

Notifications You must be signed in to change notification settings

deydoux/42cursus-cub3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cub3d

This project is inspired by the world-famous eponymous 90's game, which was the first FPS ever. It will enable you to explore ray-casting. Your goal will be to make a dynamic view inside a maze, in which you'll have to find your way.

About the project

This project is part of the 42 curriculum and focuses on creating a 3D maze game using raycasting techniques. The main objectives include:

  • Implementing a raycasting engine from scratch
  • Creating a first-person perspective view
  • Handling player movement and rotation
  • Managing textures for walls
  • Processing keyboard inputs for smooth controls
  • Understanding 3D graphics fundamentals
Gameplay.webm

Key Requirements

  • The game must use raycasting for 3D rendering
  • Player must be able to move through the maze with WASD keys
  • Player must be able to rotate the camera with arrow keys
  • Configuration file must specify:
    • NO/SO/WE/EA Texture for walls
    • F/C Floor and ceiling colors
  • Map must be constructed with these components:
    • 1 Walls
    • 0 Empty spaces
    • N/S/E/W Player starting position and orientation

Bonus features

  • Wall collisions
  • Minimap system
  • Doors that can open and close (D in map)
  • Animated sprites (Tab separated)
  • Mouse rotation

Skills Learned

  • 3D graphics programming fundamentals
  • Raycasting implementation
  • Texture mapping and rendering
  • Mathematical concepts for graphics
  • Optimization techniques for real-time rendering
  • Event handling in a graphical environment

Getting started

Requirements

For Ubuntu/Debian

sudo apt-get install gcc libbsd-dev libxext-dev make xorg

For macOS

brew install xquartz
reboot

Build

make

Run

./cub3d_bonus assets/maps/mc_subject_bonus.cub
./cub3d_bonus assets/maps/mc_subject_bonus.cub -k zqsd # AZERTY layout

You can replace assets/maps/mc_subject_bonus.cub by any .cub file.

Ressources

About

This project is inspired by the world-famous eponymous 90's game, which was the first FPS ever. It will enable you to explore ray-casting. Your goal will be to make a dynamic view inside a maze, in which you'll have to find your way.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published