A project coded in in accordance with The Norm of 42 School.
Welcome to so_long! This project is a fun and challenging 2D game where the player's goal is to help Santa collect all the gifts before his 'flight'. I chose to create a Christmas-theme, inspired by the season I developed the game.
Graphics Library that was used: MLX42
- 2D game with a grid-based map.
- Move your character using either W, A, S, D keys or the arrows.
- Escape the map after collecting all gifts.
- Movement count displayed on the screen (bonus feature).
- Clean exit using ESC or the red cross.
✔️ File extension must be .ber.
✔️ Must contain: 1 Start (P), 1 Exit (E) and at least 1 Collectible (C)
✔️ Surrounded by walls (1).
✔️ Rectangular in shape.
Basic Map Example:
111111
1P0C01
100001
1E0001
111111
- 🐍 Enemy Patrols - Avoid Grinch that cause instant defeat.
- 🎨 Sprite Animation - Animated gifts and Enemy.
- 🖥️ Movement Counter on Screen - Track moves directly within the game.
- Clone the repository:
git clone https://github.com/MKcodes2/so_long.git so_long_MK - Navigate to the project's directory:
cd so_long_MK- Compile the program:
make- Run the game, with any map of your choice. Example:
./so_long maps/smaller_map.bermake- Compile the game.make clean- Remove object files.make fclean- Remove all build files.make re- Recompile everything.make bonus- Compile the bonus features.
- Ensure MiniLibX is properly installed.
- Confirm that your .ber map is valid.
- Check for memory leaks using valgrind.
Feel free to fork this project, suggest changes, or add your own creative themes!
