Skip to content

A small 2D game using MiniLibX, including textures, sprites and some basic gameplay elements.

Notifications You must be signed in to change notification settings

denisgodoy/42-so_long

Repository files navigation

Graphics ImperativeProgramming

so_long 🎮

A small 2D game using MiniLibX, including textures, sprites and some basic gameplay elements.

so_long

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

Evaluation

grade badge

Game rules

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 exit E, at least 1 free space 0 and 1 collectible C;
    • .ber file extension.
  • 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.

Mandatory part

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

mandatory_so_long

Bonus part

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

bonus_so_long

About

A small 2D game using MiniLibX, including textures, sprites and some basic gameplay elements.

Resources

Stars

Watchers

Forks