The "so_long" project is a part of 42's curriculum and involves creating a 2D game using C programming language and the MinilibX graphic library. The game requires players to navigate through a maze, collecting items and avoiding obstacles.
The project includes learning about file descriptors (fd) and their use in reading from a map file as well as how to deal with structs. These are important concepts in C programming, and this project provides an opportunity to practice both in a fun and engaging way.
Click here to access the complete subject of this project.
To install and play So Long, follow these steps:
- Clone the repository:
git clone git@github.com:ziliolu/42_so_long.git
- Navigate to the project directory and compile it:
cd so_long && make
- Choose a map from maps folder or test with your own map
./42_so_long maps/valid1.ber
./42_so_long path_to_your_own_map
Maybe you could notice a different coding style. At 42 we need to follow some rules according to the coding standard of the school such as:
- No for, do while, switch, case or goto
- No functions with more than 25 lines
- No more than 5 functions per each file
- No more than 5 variables in the same function
- No assigns and declarations assigns in the same line
Click here to read the norm file of 42 school.