{"id":19053297,"url":"https://github.com/jotavare/so_long","last_synced_at":"2026-02-28T04:13:02.227Z","repository":{"id":155284592,"uuid":"614354093","full_name":"jotavare/so_long","owner":"jotavare","description":"Simple 2D game using the minilibx library and C.","archived":false,"fork":false,"pushed_at":"2024-06-26T23:16:13.000Z","size":3551,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T10:25:25.483Z","etag":null,"topics":["2d-game","2d-game-engine","2d-graphics","c","game","game-development","gdb","makefile","minilibx","mlx","norminette","pixel-art","sprite-animation","valgrind"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jotavare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-15T12:22:24.000Z","updated_at":"2025-01-22T06:01:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9ef7b92-3f96-4530-949d-c2d7525f8e5c","html_url":"https://github.com/jotavare/so_long","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavare%2Fso_long","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavare%2Fso_long/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavare%2Fso_long/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavare%2Fso_long/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jotavare","download_url":"https://codeload.github.com/jotavare/so_long/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319721,"owners_count":22051075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-game","2d-game-engine","2d-graphics","c","game","game-development","gdb","makefile","minilibx","mlx","norminette","pixel-art","sprite-animation","valgrind"],"created_at":"2024-11-08T23:30:01.376Z","updated_at":"2025-10-30T09:39:37.725Z","avatar_url":"https://github.com/jotavare.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/jotavare/jotavare/blob/main/42/banners/piscine_and_common_core/github_piscine_and_common_core_banner_so_long.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/status-finished-success?color=%2312bab9\u0026style=flat-square\" /\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/evaluated-21%20%2F%2001%20%2F%202023-success?color=%2312bab9\u0026style=flat-square\" /\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/score-125%20%2F%20100-success?color=%2312bab9\u0026style=flat-square\" /\u003e\n\t\u003cimg src=\"https://img.shields.io/github/languages/top/jotavare/so_long?color=%2312bab9\u0026style=flat-square\" /\u003e\n\t\u003cimg src=\"https://img.shields.io/github/last-commit/jotavare/so_long?color=%2312bab9\u0026style=flat-square\" /\u003e\n\t\u003ca href='https://www.linkedin.com/in/jotavare' target=\"_blank\"\u003e\u003cimg alt='Linkedin' src='https://img.shields.io/badge/LinkedIn-blue?style=flat-square'/\u003e\u003c/a\u003e\n\t\u003ca href='https://profile.intra.42.fr/users/jotavare' target=\"_blank\"\u003e\u003cimg alt='42' src='https://img.shields.io/badge/Porto-100000?style=flat-square\u0026logo=42\u0026logoColor=white\u0026labelColor=000000\u0026color=000000'/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"#about\"\u003eAbout\u003c/a\u003e •\n\t\u003ca href=\"#how-to-use\"\u003eHow to use\u003c/a\u003e •\n\t\u003ca href=\"#mandatory\"\u003eMandatory\u003c/a\u003e •\n\t\u003ca href=\"#bonus\"\u003eBonus\u003c/a\u003e •\n\t\u003ca href=\"#norminette\"\u003eNorminette\u003c/a\u003e •\n\t\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e •\n\t\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n## ABOUT\nThis is a 2D game where the player navigates through a maze-like environment to reach a goal, avoiding obstacles and enemies. It is created using the MiniLibX library and I had to implement game mechanics, file input/output, and basic graphics.\n\n## HOW TO USE\n#### 1º - Clone the repository\n```bash\ngit clone git@github.com:jotavare/so_long.git\n```\n#### 2º - Enter the project folder and run `make` or `make bonus`\n\u003e **Important:** To run the program, you need to download the MiniLibX.\n```bash\ncd so_long/so_long\nmake or make bonus\n```\n\n#### 3º - Run the game with a map of your choice\n```bash\n./so_long [map.ber]\n./so_long_bonus [map_bonus.ber]\n```\n\n#### MAKEFILE RULES\n\n`make` - Compile so_long files.\n\n`make bonus` - Compile so_long_bonus files.\n\n`make all`  - Compile mandatory + bonus files.\n\n`make clean`  - Delete all .o (object files) files.\n\n`make fclean`  - Delete all .o (object files) and .a (executable) files.\n\n`make re` - Use rules `fclean` + `all`.\n\n## MANDATORY\n- [x] Must use MiniLibX.\n- [x] Makefile must compile source files and should not relink.\n- [x] The program has to take as a parameter a map description file ending with the `.ber` extension.\n\n#### GAME\n- [x] **Goal:** Collect every collectable and escape choosing the shortest route.\n- [x] `W`, `A`, `S` and `D` keys must be used to move the main character `up`, `down`, `left` and `right`.\n- [x] Can't move into walls.\n- [x] Number of movements must be displayed in the shell.\n- [x] Must be a 2D view (top-down or profile).\n- [x] Doesn't need to be real-time.\n\n#### GRAPHIC MANAGEMENT\n- [x] Display the image in a window and must remain smooth (changing windows, minimizing, ...).\n- [x] Pressing `ESC` must close the window and cleanly quit the program.\n- [x] Clicking on the window cross must also close and quit the program cleanly.\n- [x] The use of the images of the MiniLibx is mandatory.\n\n#### MAP COMPONENTS\n- [x] The map should include 3 components to be constructed: walls, collectables and free space.\n- [x] Should be composed of only these 5 characters:\n\n| Characters | Description |\n| :--: | :--: |\n| `0` | Empty space.              |\n| `1` | Wall.                     |\n| `C` | Collectible.              |\n| `E` | Map exit.                 |\n| `P` | Player starting position. |\n\n#### MAP VALIDATION\n- [x] The map must contain 1 exit, at least 1 collectable, and 1 starting position to be valid.\n- [x] Map must be rectangular.\n- [x] Map must be closed/surrounded by walls. If not, the program should return an error.\n- [x] Check if there is a valid path in the map.\n- [x] The program must be able to parse any kind of map, as long it respects the rules.\n- [x] If an error/misconfiguration is encountered, it should return `Error\\n` followed by an explicit message.\n\n\u003e Map `.ber` example:\n```\n111111111111\n1001000000C1\n100000011101\n1P0011E00001\n111111111111\n```\n\n## BONUS\n- [x] Develop original extra features (optional).\n- [x] Make the player lose when they touch an enemy patrol.\n- [x] Add sprite animation.\n- [x] Display the movement count directly on the screen, instead of writing in the shell.\n\n## NORMINETTE\n\u003e At 42 School, it is expected that almost every project is written following the Norm, which is the coding standard of the school.\n\n```\n- No for, do...while, switch, case, goto, ternary operators, or variable-length arrays allowed;\n- Each function must be a maximum of 25 lines, not counting the function's curly brackets;\n- Each line must be at most 80 columns wide, with comments included;\n- A function can take 4 named parameters maximum;\n- No assigns and declarations in the same line (unless static);\n- You can't declare more than 5 variables per function;\n- ...\n```\n\n* [42 Norms](https://github.com/42School/norminette/blob/master/pdf/en.norm.pdf) - Information about 42 code norms. `PDF`\n* [Norminette](https://github.com/42School/norminette) - Tool to respect the code norm, made by 42. `GitHub`\n* [42 Header](https://github.com/42Paris/42header) - 42 header for Vim. `GitHub`\n\n## CONTRIBUTING\n\nIf you find any issues or have suggestions for improvements, feel free to fork the repository and open an issue or submit a pull request.\n\n## LICENSE\n\nThis project is available under the MIT License. For further details, please refer to the [LICENSE](https://github.com/jotavare/so_long/blob/master/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjotavare%2Fso_long","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjotavare%2Fso_long","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjotavare%2Fso_long/lists"}