Skip to content

andersonhsporto/ft-so_long

Repository files navigation

so_long

Para acessar a versão em português deste README clique aqui.

Щоб прочитати цей файл українською, перейдіть за посиланням here.

42

Description

Project of the 42 school common core curriculum. The goal is to create a proof of concept of a 2D game using the MinilibX graphic library and the ANSI C language.

This project is a simple game where the player must collect all the items on the map and reach the exit, the player can only move horizontally and vertically, the map is composed of walls, empty spaces, collectible items and the exit, the player loses if he collides with an enemy.

This project is build for educational purposes and you are free to use it as you wish.

If you are a 42 student, feel free to use this project as a reference, but remember: ** you need to understand the code to use it ** and maybe this is not compliant with that last subject you are working on, so be careful.

MLX

The MinilibX is a simple X-Window programming API in C, designed for students, suitable for beginners.

Code style

The code style used in this project is the Norminette created by the 42 school and used in all related ANSI C projects in the context of the school.


Installation

Before compiling the project it is necessary to install MLX library a guide can be found in the MinilibX repository.

This project also uses the external library Libft also developed in the 42 school curriculum, to clone this project and this library use the command:

git clone --recursive https://github.com/andersonhsporto/ft-so_long.git

this command will clone the project and the Libft submodule


This project is divided into two parts, the mandatory and the bonus.

To compile the mandatory part (character movement and item collection) use:

make

mandatory

To compile the bonus part (animation, movement counter and enemies) use:

make bonus

bonus

Usage

After compiling the project, the executable file with the name so_long will be created, to run the game call the executable passing the map as an argument:

Example:

./so_long map.ber

some maps and the map used to generate the header image can be found in the maps folder

References

Contact Information

If you have any questions, suggestions, or critiques, please contact me using email or through LinkedIn. feedbacks are always welcome =D

Contributors

If you want to contribute and improve this project, you can fork this repository and submit a pull request with your changes, I will be happy to review and accept your changes

Appreciation

I would like to thank the following people for their contributions to this project: