A 2D game project developed for the 42 School, using the MiniLibX library.
The so_long
project is a simple 2D game where the player must navigate through a map, collect items, and reach the exit while avoiding enemies. The game was developed as part of the 42 School curriculum, with the objective of understanding basic game mechanics and graphical rendering using the MiniLibX library.
- 2D Game Rendering using MiniLibX
- Player Movement across a grid-based map
- Collectible Items that must be gathered before exiting
- Enemies that the player must avoid
- Customizable Maps created using simple text files
-
Clone the repository:
git clone https://github.com/Alabar666/so_long.git
-
Navigate to the project directory:
cd so_long
-
Compile the game:
make
-
Run the game with a map file:
./so_long maps/sample_map.ber
- Use the arrow keys to move the character.
- Collect all the items (
C
) on the map. - Avoid the enemies (
M
) and reach the exit (E
).
The character's idle animation when not moving.
An animation showing the action of killing a goblin.
An animation that plays when the player loses the game.
An animation that plays when the player wins the game.
The character's idle animation when not moving, shown in a small scale.
The character's idle animation when not moving, shown in a large scale.
Maps are simple .ber
files that represent the game grid. Each character in the file corresponds to a different element:
1
- Wall0
- Empty SpaceP
- Player Start PositionC
- Collectible ItemE
- ExitM
- Enemy
Contributions are welcome! Feel free to submit a pull request or open an issue.
A special thanks to Kahon Senpai for the amazing sprites used in the game. Your artwork greatly enhanced the visual appeal and overall experience of the project. I appreciate your creativity and dedication to the gaming community. https://kahonsenpai.itch.io/non-commercial-goblin-slayer