This project is part of the 42 curriculum and focuses on creating a simple 2D game using the MinilibX graphics library. The main objectives include:
- Working with textures, sprites, and basic game elements
- Handling keyboard events for player movement
- Implementing basic game mechanics (collecting items, reaching exit)
- Managing window events and proper game closure
- Reading and validating map files
- Understanding basic game development concepts
Gameplay.webm
- The player must collect all collectibles before reaching the exit
- The game must be viewed from a 2D perspective (top-down or profile)
- The player must be able to move in 4 directions: up, down, left, right
- The player cannot move through walls
- Number of movements must be displayed in the shell
- Must use MinilibX for graphics rendering
- Valid path to complete the game
- Map must be constructed with 5+1 components:
0
Empty spaces1
WallsP
Starting positionC
CollectiblesE
ExitR
Rakes (Enemies bonus)
11111
1C1P1
10001
1E1R1
11111
- Animated sprites
- Enemies
- Movement count display
- Graphics programming fundamentals
- Event handling in a graphical environment
- Game logic implementation
- Memory management
- File parsing and error handling
For Ubuntu/Debian
sudo apt-get install gcc libbsd-dev libxext-dev make xorg
For macOS
brew install xquartz
reboot
make
./so_long_bonus maps/maze10.ber
./so_long_bonus maps/maze10.ber -k zqsd # AZERTY layout
You can replace maps/maze10.ber
by any .ber
file.