So-long is a 42 school project in which you must create a little 2d game using the MiniLibX, a graphical library.
You can use make in the root folder of the project to create the executable :
make
Then launch the program by using :
./so_long
The program work by generating a map from a .ber file. Here the elements which composes the map's file.
- 1 - Wall (The map must be surrounded by walls)
- 0 - Ground
- P - Player (Maximum one allowed)
- E - Exit (Maximum one allowed)
- C - Collectibles (Must collect all the collectibles before exiting)
- T - Traps (Animated; walking on it results in death)
![](https://private-user-images.githubusercontent.com/124448529/266316646-eb4f0808-d1d6-421c-b00b-806e9f96c86f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyNTk0MzcsIm5iZiI6MTcyMzI1OTEzNywicGF0aCI6Ii8xMjQ0NDg1MjkvMjY2MzE2NjQ2LWViNGYwODA4LWQxZDYtNDIxYy1iMDBiLTgwNmU5Zjk2Yzg2Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxMFQwMzA1MzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNTMyMWZkYjNlZWJlMmZlYjlmYTliZTRjOWNhM2M3NmY4NmQxNGY5YzhjYjE2YTA0NDNjZTMwZDRjMTI2MjJhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.dZiSMUZlLx8fNanZ4W7iGRZd3T41Oy1XPxrlCjVV0Mg)
After create your own .ber map, or not, you can launch the program. You can select a map with 1-2-3 or use 4 to use your own map.
![](https://private-user-images.githubusercontent.com/124448529/266320123-c1210f0b-79de-4220-8e51-febce1ff9163.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyNTk0MzcsIm5iZiI6MTcyMzI1OTEzNywicGF0aCI6Ii8xMjQ0NDg1MjkvMjY2MzIwMTIzLWMxMjEwZjBiLTc5ZGUtNDIyMC04ZTUxLWZlYmNlMWZmOTE2My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxMFQwMzA1MzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05ODk1ZmQ1MGU0YzI0YjAyYTE5OGY0MWFjMDRjYjM0NzBjMjMyYTZjZTkzOGY2NmU4NjJmMWRmODFlYmQzODBmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.U_fch7njsL8orqUaiGy9_JZihGmb7Tsp4unI8OYJLKM)
Now, you can start playing ! Use your keyboard arrows to move, collect all the objects, avoid the traps, and make your escape!