🧱 so_long
A simple 2D graphical game built using the **MiniLibX** graphics library. The player navigates through a map, collects items, and finds the exit. Part of the 42 Network's Common Core curriculum.- Control the player (
P) on a grid-based map. - Collect all the collectibles (
C). - Reach the exit (
E) after collecting all items. - Avoid stepping into invalid tiles (walls
1).
make # Compile mandatory version
make bonus # Compile bonus version (if implemented)
make clean # Remove object files
make fclean # Remove object files and binaries-
File extension:
.ber -
Valid characters:
1→ Wall0→ Empty spaceP→ Player start (only one)E→ Exit (only one)C→ Collectible (at least one)
11111
1P0C1
100E1
11111
- W / A / S / D → Move player
- ESC → Quit the game
- Map must be rectangular and enclosed by walls.
- Exactly 1 player, 1 exit, at least 1 collectible.
- All collectibles must be collected before exiting.
- The program must handle invalid maps gracefully.
- Enemy support (
N) - Animations
- Move counter display
- Mouse/keyboard enhancements
- Better UI visuals
- The map is read from a
.berfile and checked for validity. - A flood-fill algorithm ensures the map is solvable.
- The game uses MiniLibX to render the map and handle events.
- Graphics programming using MiniLibX
- Handling user input
- Validating and parsing files
- Pathfinding algorithms (like flood-fill)
- Clean code organization and Makefiles

