A 42 graphical project: a small 2D game built with the MiniLibX library where the player navigates a maze, collects items, and reaches the exit.
- Loads and parses a maze from a
.bermap file - Keyboard-controlled character movement
- Collectible items + exit unlocking
- Tile-based rendering via MiniLibX
- Map validation, including a DFS path-checking algorithm to confirm the map is solvable
makeRequires MiniLibX — see the MiniLibX docs for installation.
./so_long maps/valid/map.berA valid .ber file uses the following tiles:
| Char | Meaning |
|---|---|
1 |
Wall |
0 |
Empty space |
C |
Collectible item |
E |
Exit |
P |
Player start |
The map must be rectangular, fully enclosed by walls, and contain exactly one P, at least one C, and at least one E.
so_long.c,so_long.h— entry point and headersparser.c,parser2.c— map file parsing and validationdfs.c— depth-first path check (confirmsPcan reach everyCand theE)keyhooks.c— keyboard input handlingutils/— helper functionsimg/— sprite assetsmaps/— sample valid and invalid mapsmlx/— MiniLibX
