so_long
is a simple 2D game project developed as part of the 42 coding school curriculum.
The objective of the game is to navigate through a maze, collect all the collectibles, and reach the exit without getting caught by enemies.
- 2D graphics rendering using the MiniLibX library.
- Player movement and collision detection.
- Collectibles the player neesd to collect all the carrots!!
- Basic enemy random move - using the rand() function.
- Win and lose conditions. - Help the nice witch to catch her kitty cat!!
To run the so_long
project, you need the following:
- A Unix-like operating system (Linux or macOS). I have added both options in the Makefile - feel free to uncomment.
- The MiniLibX library installed on your system.
- A C compiler.
-
Clone the repository:
git clone https://github.com/Eyzou/so_long.git cd so_long
-
Compile the project:
without bonus
make
with bonus
make bonus
To start the game, run the following command:
./so_long maps/map.ber
Replace maps/map.ber
with the path to your map file.
- W: Move up
- A: Move left
- S: Move down
- D: Move right
- ESC: Exit the game
The game maps are defined in .ber
files and should follow this format:
1
: Wall0
: Empty spaceP
: Player start positionE
: ExitC
: CollectibleM
: Enemy
Example map:
111111
1P0C1E
111111
This project was developed by [EYZOU LA PTITE GOAT] as part of the 42 curriculum.