The so_long
project is part of the 42 school curriculum, challenging students to create a simple 2D game using the MinilibX library. The repository includes map
and texture
folders, with the map containing .ber files and the texture
containing xpm image files.
The project consists of a game where a player (identified by P
) navigates through a map with various elements such as walls (1
), empty spaces (0
), exits (E
), and collectibles (C
). The player must collect all collectibles and reach the exit to win the game.
The repository is structured as follows:
map
: Contains .ber files, each defining a map with identifiers1
,0
,P
,E
, andC
.texture
: Contains xpm image files for the visual representation of different game elements.
- Controls: The player can move using the keys
W
(up),A
(left),S
(down), andD
(right). - Objective: Collect all collectibles (
C
) and reach the exit (E
) to win the game. - Exit: The player can exit the game by pressing
ESC
or the window close button.
The game ends when the player has collected all collectibles and reaches the exit.
- Clone the repository:
git clone https://github.com/seungwonme/so_long
- Navigate to the project directory:
cd so_long
- Compile the so_long executable:
make
- Run the game with a .ber file:
./so_long maps/map.ber
- To clean up object files:
make clean
- To delete all build files:
make fclean
- To clean and rebuild the executable:
make re