I've completed this project between February and March 2022 with a friend of mine. cub3D
is one of the mandatory projects that every 42 student has to complete as part of the core school curriculum. It has to be written in C
. 42 is the first tuition-free computer training, open to all, regardless of diploma.
The project subject can be found here. The goal of cub3D
is to partially reproduce the world famous game Wolfenstein 3D
, a first person shooter video game released in 1992. More precisely, we had to build from scratch a simple ray casting rendering similar to the Wolfenstein 3D
engine.
Wolfenstein 3D is considered one of the greatest video games ever made for mainly two reasons. Firstly, it became very quickly a huge commercial success. Secondly, it is said to be the "grandfather of 3D shooters": it popularized the first-person shooter genre thanks to its innovative 3D game engine.
This is the first game I've ever developed. I've learnt how to use the minilibx graphic library, "a simple X-Window (X11R6) programming API in C, designed for students". The minilibx
is intended to be easy to use and turns out to be quite minimalist, which can be both an advantage and a drawback. We had to program from scratch the display of each frame, pixel by pixel. It was a great opportunity for me to brush up on my mathematics skills, mainly in trigonometry and in linear algebra. It's also the first time I've practiced "pair programming": we worked together with my mate at one workstation. While one was writing code, the other had to review each line of code as it was typed in.
Here are some useful resources which could save time to future 42 school students:
- First of all, to get started with the minilibx, this page may help
- You'll find more information regarding the minilibx here
- This Computer Graphics tutorial written for C++ beginners helped us a lot
- This document drafted by a student of 42 Lyon may help you as well
- This repo by another student at 42 Paris details each step of the project development