so_long is a simple 2D game where the player must navigate through a map, collect all items, and reach the exit. The game is built using the MinilibX graphics library and includes basic sprite rendering and movement mechanics.
Key Concepts:
- 2D Rendering: The game uses a grid-based map with each tile representing an element (player, wall, collectible, or exit).
- Player Controls: The player moves using keyboard input to explore the map and complete the objective.
- MinilibX: A minimal graphical library used to handle window creation, image drawing, and event management.
Before running the project, ensure you have the following dependencies installed:
sudo apt-get install gcc
sudo apt-get install make
sudo apt-get install xorg
sudo apt-get install libxext-dev
sudo apt-get install libbsd-dev
sudo apt-get install libx11-devThese libraries are necessary for compiling and running the game on a Linux system.
To clone the repository and compile the game, use the following command:
git clone git@github.com:Leined18/so_long.git
cd so_long
makeYou can immediately play the game by cloning the repository and running the default map:
git clone git@github.com:Leined18/so_long.git && cd so_long && make && ./so_long assets/maps/map1.berThis will start the game using the provided map1.ber file.
Alternatively, you can specify a different map to play with:
make run MAP=<map_name>Replace <map_name> with the name of the .ber map file you wish to load.
If you want to run the game with the bonus features enabled, use:
make run_bonus MAP=<map_name>This command compiles and runs the game with any extra features implemented in the bonus part of the project.
- Ensure that your map files are in the correct format and placed in the
assets/mapsdirectory. - The game will only run properly if the provided map follows the correct structure (walls, collectibles, player start, and exit).
