Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bonus 2/5 Completed

🕹️ cub3d

A basic 3D raycasting game engine in C, following the 42 project guidelines


💡 About the project

As a team project, Cub3D is a fundamental graphics project at 42 Wolfsburg, where the goal is to build a simple 3D game engine using raycasting techniques (similar to Wolfenstein 3D) in the C programming language. The project involves rendering a 2D map as a 3D environment, managing textures, player movement, and collision detection. It encourages a deep understanding of math for computer graphics, low-level programming, and practical problem-solving, while also fostering teamwork, communication, and collaborative development skills.

🚀 Bonus

  • 2 out of 5 bonus features implemented (wall collision and minimap)

For more detailed information, check the subject of this project.

🛠️ Usage

Requirements

Cub3D is written in C and requires the gcc compiler, the MiniLibX graphics library, and standard C libraries to build and run.

Instructions

1. Compile cub3d

In the project directory, run:

$ make

2. Run cub3d

After compilation, launch cub3d with:

$ ./cub3d <map_file.cub>

3. Playing cub3d

  • Move around the 3D world using the keyboard (WASD/arrows), and look around with the mouse (if supported).
  • Explore the map, avoid walls, and enjoy the retro 3D rendering.
  • Bonus features such as a minimap available.

📚 What I Learned

  • Teamwork and efficient communication throughout a complex project
  • Math for raycasting and 3D projection (trigonometry, vectors)
  • Graphics programming with MiniLibX (drawing pixels, textures)
  • Map parsing and validation
  • Real-time game loop and event handling
  • Player movement and collision detection
  • Texture loading and rendering
  • Implementing and debugging advanced features (minimap, animated sprites, doors, etc.)
  • Robust memory management and debugging in C

About

3D raycasting game project in C

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages