https://github.com/kuninoto/42_so_long
A small 2D game developed with MiniLibx, the graphic library of the 42School.
https://github.com/kuninoto/42_so_long
1337school 2d-game 42 42-cursus 42-school 42born2code 42cursus 42ecole 42porto 42portugal 42projects 42school 42solong ecole42 mlx42 school42 so-long so-long42
Last synced: 7 months ago
JSON representation
A small 2D game developed with MiniLibx, the graphic library of the 42School.
- Host: GitHub
- URL: https://github.com/kuninoto/42_so_long
- Owner: Kuninoto
- Created: 2022-11-18T23:35:16.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-27T23:20:10.000Z (8 months ago)
- Last Synced: 2025-04-05T12:42:01.272Z (8 months ago)
- Topics: 1337school, 2d-game, 42, 42-cursus, 42-school, 42born2code, 42cursus, 42ecole, 42porto, 42portugal, 42projects, 42school, 42solong, ecole42, mlx42, school42, so-long, so-long42
- Language: C
- Homepage:
- Size: 277 KB
- Stars: 14
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# so_long (42Porto - 42Cursus)
## Grade: 110/100
### Description
Simple 2D game: catch all coins, and exit! Made as an introduction to graphics programming.
### Showcase:

### 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- Run `make`
make
4- `make clean` so that you don't keep those object files that you won't need anymore
make clean
5- Run `so_long` with a map of your choice!
./so_long [path/to/map].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;
(Examples of valid maps on maps folder);
#### Makefile available targets:
`make` or `make all` - compiles `so_long`
`make bonus` - same as `all` (added for assignment purposes)
`make clean` - wipes all object files
`make fclean` - deletes so_long and all object files
`make re` - `fclean` + `all`
### Useful links:
[MiniLibX docs](https://harm-smits.github.io/42docs/libs/minilibx/introduction.html)
[itch.io](https://itch.io/)
[OpenGameArt](https://opengameart.org/)
#### Assets credits:
[8-bit Dungeon Tileset](https://jamiecross.itch.io/8-bit-dungeon-tilesetsprites)
## Disclaimer
> At [42School](https://en.wikipedia.org/wiki/42_(school)), 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) | nnuno-ca@student.42porto.com