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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA4MjgwNDIsIm5iZiI6MTcyMDgyNzc0MiwicGF0aCI6Ii8xMjQ0NDg1MjkvMjY2MzE2NjQ2LWViNGYwODA4LWQxZDYtNDIxYy1iMDBiLTgwNmU5Zjk2Yzg2Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxMlQyMzQyMjJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNTcwZmRmMDVmY2FkZTAxZThhMjk5OWVjYmZlOGYyMzViN2Y0MTljY2MwY2ZlNjM1OWE4MmE2M2ZlNzUwNTBjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.hvyOLGzcyFTJc5-8DchqwWqlz4QS3p2Fx8HLEqNMk_I)
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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA4MjgwNDIsIm5iZiI6MTcyMDgyNzc0MiwicGF0aCI6Ii8xMjQ0NDg1MjkvMjY2MzIwMTIzLWMxMjEwZjBiLTc5ZGUtNDIyMC04ZTUxLWZlYmNlMWZmOTE2My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxMlQyMzQyMjJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02MGJjYjVjN2U0NzZlYTRkYzIxOWRkNDY4MzVkY2NiNGMyMmU4NzcxNDUwMzNlY2MyY2JmNDk4MmI3NjRkN2IxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.ritH3yXXPe49ef4_ZgH9tKKOk9nFmn08Uor09xlPYYQ)
Now, you can start playing ! Use your keyboard arrows to move, collect all the objects, avoid the traps, and make your escape!