A 2D graphic game with MinilibX.
Clone this repository to your computer:
git clone https://github.com/MatPizzolo/Solong.git
First compile and install library
make
Run the game with a specific map file as argument.
./so_long "maps/first.ber"
Control your character to collect all items in the map and reach the exit.
You can control the main character with the specific keys below.
Key | Description |
---|---|
A |
Walk Left |
W |
Walk Up |
S |
Walk Down |
D |
Walk Right |
Esc |
Exit Game |
You can create your own map file as you like but need to follow these rules.
- map is covered with walls
- map is contained with 1 item, 1 player and 1 exit door.
- The map must be rectangular
- map file name need end with
.ber
- place map file in
maps
directory
The character is defined in file follow like these
Character | Description |
---|---|
0 |
Free space |
1 |
Wall |
P |
Player |
E |
Exit door |
C |
Collectable item |
Map file example
1111111111111
100100010C001
10010100000C1
100C011111001
1P0011E000001
1111111111111