karakuscem / 42-so_long

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

So_Long Project

This is a solution for the So_Long project from 42 schools, which involves creating a simple 2D game using the minilibx library. The objective of the game is to collect all the items on the map and reach the exit without being caught by enemies.

DISCLAIMER

This repo contains my own solution for So_Long project. It is uploaded to trac my own progress. It is not recommended for those who are doing the project.

Installation

To run this program, you will need to have the following dependencies installed on your system:

-gcc -make -mlx library

To install minilibx, you can follow the instructions provided in the official repository.

Note : This project made in MacOS so it is possibly not going to work in Linux.

Once you have all the dependencies installed, you can clone this repository and compile the program using the Makefile:

git clone <repository-url>
cd so_long
make

Usage

To run the game, simply run the executable file:

./so_long <map-file>

where <map-file> is the path to the map file you want to use for the game.

Map file format

The map file should have the following format:

111111
100001
101101
100001
111111

where 1 represents a wall, 0 represents an empty space, and P, E, and C represent the player, exit, and collectible items, respectively.

Features

This implementation of the So_long project includes the following features:

  • A fully functional game with a player, enemies, collectibles, and an exit.
  • Movement using WASD.
  • Door animation.
  • Enemy patrol.

About


Languages

Language:C 94.9%Language:Makefile 5.1%