Skip to content

A small 2D game developed with MiniLibx, the graphic library of the 42School.

Notifications You must be signed in to change notification settings

Kuninoto/42_so_long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

so_long (42Porto - 42Cursus) C Logo 

Grade: 110/100

Screenshot:

Installing and running the project:

1- Installing mlx dependencies

sudo apt-get install make xorg libxext-dev zlib1g-dev libbsd-dev

2- Clone this repository

git clone https://github.com/Kuninoto/42_so_long

3- Navigate to lvl_2_so_long and run make

cd 42_so_long/lvl_2_so_long
make

4- make clean so that you don't keep those object files that you won't need anymore

make clean

5- Run your new, extremely sexy, game, with a map of your choice!

./so_long maps/[which_ever_map_you_want].ber

Creating new maps:

'0' - Free space;  
'1' - Wall;  
'C' - Collectible;  
'E' - Exit;  
'P' - Player's starting position;  
To be valid a map must respect the following:  
	- Be in .ber format;  
	- Be closed by walls;  
	- Be retangular;  
	- Contain only one P;  
	- Contain only one E;  
	- Contain at least one C;  
	- All elements must be accessible (not closed by walls);  
	- Be composed only by valid characters i.e 0, 1, C, E, P;  
(You can check examples of valid maps on maps folder);

Makefile Available Targets:

make or make all - compiles so_long
make bonus - same as all (added for subject purposes)
make clean - wipes all object files
make fclean - deletes so_long and all object files
make re - fclean + all

Useful links:

Assets Credit:

Disclaimer

At 42School, almost every project must be written in accordance to the Norm, the schools' coding standard. As a result, the implementation of certain parts may appear strange and for sure had room for improvement.


Made by Nuno Carvalho (Kuninoto) | [email protected]