So Long is a simple 2D game project developed as part of the 42 school curriculum. In this game, a player navigates through a map, collecting items and reaching the exit while avoiding obstacles.
- 2D top-down view gameplay
- Player movement using W, A, S, D keys
- Collectible items
- Exit point
- Wall obstacles
- Enemy patrols (Bonus feature)
- Sprite animations (Bonus feature)
- On-screen movement counter (Bonus feature)
- Use the following keys to move the player:
- W: Move up
- S: Move down
- A: Move left
- D: Move right
- Collect all items on the map
- Reach the exit to win the game
- Avoid enemy patrols (in bonus version)
- Clone the repository
- Run
maketo compile the game - Run
./so_long maps/[map_name].berto start the game with a specific map
- MiniLibX library
- C compiler (gcc recommended)
- Make
The project includes a Makefile with the following rules:
make: Compile the gamemake clean: Remove object filesmake fclean: Remove object files and executablemake re: Recompile the gamemake bonus: Compile the game with bonus features
This project follows the 42 school's Norm coding style. The Norminette tool is used to check compliance with the Norm. For more information about the Norm, please refer to the 42 Norm documentation.
Maps are provided as .ber files with the following components:
- 0: Empty space
- 1: Wall
- C: Collectible
- E: Exit
- P: Player starting position
This implementation includes the following bonus features:
- Enemy patrols that cause the player to lose upon contact
- Sprite animations for game elements
- On-screen display of the movement count
