This repository contains the entire codebase for the so_long project, encompassing both the mandatory section and a portion of the bonus section. To build the code into a program named so_long, you can utilize the provided Makefile.
C language |
- Develop a 2D game where the protagonist must gather all necessary items before successfully escaping the map.
- Use Minilibx to create your game.
- Your project must not relink.
- The game must be in 2D view.
- Your character can move with WASD or arrow keys.
- Your character must move on 4 directions: up, down, left and right.
- Your character can't go trought walls (colision).
- Your project must displayer the character movement in the terminal.
- Your character must collect all itens before going through the exit.
- Your game must run in a window, created with the size of the map.
- Your game must close when pressing ESC or pressing the 'x' on the window.
- The map should feature a single exit point.
- The map should feature a single player.
- The map should feature at least 1 collectable.
- The map must be rectangular.
- The map should be surrounded by walls.
- The map should have an exit path collecting all collectables.
- The map should be a "*.ber" file.
Character | Description |
P | Player sprite |
0 | Floor sprite |
1 | Wall sprite |
C | Collectable sprite |
- There must be a movement counter on the game window.
- Make some animations for the game.
- There must be enemys.
- The player must die, and the game needs to be finished when coliding with an enemy.
Character | Description |
X | Enemy sprite |
To use this project, you must install the Minilibx
In order to utilize this project, you must initially clone the repository onto your local machine by employing a terminal:
- - $> git clone https://github.com/joaoneon/42_so-long.git [folder]
Once you have cloned the project into your local repository, you can execute various commands listed in the Makefile.
- - $> By executing the command "make all" or simply "make", you can compile the project.
- - $> To delete the object files created during compilation, you can use the command "make clean".
- - $> Execute the clean command and delete the so_long file and the object files, you can use the command "make fclean".
- - $> The command "make re" executes the "fclean" command followed by the "all" command. It cleans the project by deleting object files, and then recompiles the entire project.