A small 2D game using MiniLibX, including textures, sprites and some basic gameplay elements.
Clone this repository to play the game. Control keys are WASD.
git clone --recurse-submodules https://github.com/denisgodoy/42-so_long.git so_long
cd so_long
The game must follow some strict rules:
- Treat wall collisions, the player must not be able to move over walls;
- Maps have to contain an specific configuration:
- Surrounded by walls
1
; - Be rectangular;
- Contain 1 player
P
, 1 exitE
, at least 1 free space0
and 1 collectibleC
; - .ber file extension.
- Surrounded by walls
- The player can leave the map when all collectibles have been collected or;
- Press the escape
ESC
key or; - Close the window;
- A movements counter must be displayed on terminal.
There are no animations or enemies, the player must collect all keys to open the treasure chest to finish the map.
make all
./so_long maps/<map-name>.ber
The game objective remains the same, but it gets quite complex with an enemy patrol that causes the player to lose, and some sprite animation added.
- At least 1
T
character must be added to the map, representing the enemy; - The movements counter must be displayed directly on the window.
make bonus
./so_long maps/<map-name>_bonus.ber