Inside this repository, you can see all the code that has been created for the So Long project, including the mandatory part and the bonus part.
Create a 2D game in which a character will escape a map after collecting everything it has to be collected.
- Use MinilibX.
- Turn in a Makefile to compile your program and it must not relink.
- The program must take as parameter a map file ending with the '.ber' extension.
- The player must collect every collectible present on the map and then escape through the exit.
- The player must be moved by pressing AWSD keys or the arroy keys.
- The player must be moved in 4 directions: left, right, down and up.
- The player can't move into a wall.
- The program must display the movement count in the terminal.
- The game must be a 2D view.
- The program must display the image in awindow.
- The window must close and the program must quit when the user press ESC or click on the cross on the window.
- The map must be composed for five elements (6 if you implement the bonus part).
- The map must contain exactly 1 exit, 1 player starting position and at least 1 collectible.
- The map must be rectangular.
- The map must be surrounded by walls.
- The map must have a valid path between the player starting position and the exit, and be able to collect all the collectibles.
Char | Element |
---|---|
0 | ground |
1 | wall |
C | collectible |
E | exit |
P | player starting position |
- Add some enemy and make the player lose qhen they touch it.
- Add animation.
- Diaplay the steps count on the screen.
Char | Element |
---|---|
X | enemy |
Clone this repository in you local computer using a terminal:
$> git clone git@github.com:GiovannaCoqueiro/42cursus-so-long.git [repository_local]
After cloning the project in your local reposiory you can run some commands you can find in Makefile:
- $> make all: or just make compiles the project
- $> make bonus: compiles the project
- $> make clean: deletes the object files created during compilation
- $> make fclean: executes the clean command and also deletes the binary created
- $> make re: executes the fclean command followed by the all command
Than you can run the game with:
./so_long maps/<map_file.ber>
You can also create and run any map, if it follows the requirements.