{"id":20350462,"url":"https://github.com/ekkoz897/42cursus_so_long","last_synced_at":"2025-04-12T01:32:50.810Z","repository":{"id":117623287,"uuid":"584392754","full_name":"Ekkoz897/42cursus_So_long","owner":"Ekkoz897","description":"One of the first graphical projects at 42 school, so_long introduces us to 2D programming by allowing us to create our first 2D game.  Textures, sprites and tiles included.","archived":false,"fork":false,"pushed_at":"2024-03-21T17:58:30.000Z","size":1221,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T21:14:02.209Z","etag":null,"topics":["2d-game","42-school","42cursus","c","mlx","mlx-library","so-long","solong","sprite-animation"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ekkoz897.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-01-02T12:47:14.000Z","updated_at":"2024-03-21T18:38:34.000Z","dependencies_parsed_at":"2024-03-21T18:51:42.254Z","dependency_job_id":"60dbd1b3-9353-4ad8-87ee-a0b24d88b806","html_url":"https://github.com/Ekkoz897/42cursus_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/Ekkoz897%2F42cursus_So_long","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ekkoz897%2F42cursus_So_long/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ekkoz897%2F42cursus_So_long/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ekkoz897%2F42cursus_So_long/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ekkoz897","download_url":"https://codeload.github.com/Ekkoz897/42cursus_So_long/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504292,"owners_count":21115142,"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","42-school","42cursus","c","mlx","mlx-library","so-long","solong","sprite-animation"],"created_at":"2024-11-14T22:30:24.316Z","updated_at":"2025-04-12T01:32:50.779Z","avatar_url":"https://github.com/Ekkoz897.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e 42cursus_So_long \u003c/h1\u003e\n\u003cp align=\"center\"\u003e:information_source: A small 2D Game made using the MiniLibX Graphics Library - Textures, sprites and tiles included. \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/ekkoz897/42cursus_So_long\" target=\"_blank\"\u003e\u003cimg align=\"center\" alt=\"so_long\" src=\"https://user-images.githubusercontent.com/81205527/179134510-48689e9e-f8e4-4165-be40-2e0ec8f5d60d.png\"\u003e \u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e125/100 :white_check_mark:\u003c/p\u003e\n\n## Index\n* [What is so_long?](#what-is-so_long)\n* [Requirements](#requirements)\n* [How does it work?](#how-does-it-work)\n\t* [Maps](#maps)\t\n\t* [Controls](#controls)\n* [How do I test it?](#how-do-i-test-it)\n* [42 Cursus](#42-cursus)\n* [Author](#author)\n\n\u003ch2 align=\"center\" id=\"what-is-so_long\"\u003e What is so_long? \u003c/h2\u003e\n\nThe fifth project at 42 programming school.\nIt's the first graphical project in the 42 Cursus, we can choose between 3 options - FdF, Fractol and so_long - that in general\ncover different areas, but all 3 are graphical projects. The so_long consists of a top-down game, which we code from scratch using\nthe MiniLibx graphical library. It involves a series of validations from the map that is passed as argument,\nchecks to prevent memoy leaks, the game engineering, managing windows, events, sprites and maps.\n\t\n\u003ch2 align=\"center\" id=\"requirements\"\u003e Requirements \u003c/h2\u003e\n\n\u003cp  align=\"center\"\u003e :warning: The project must be written in accordance with the \u003ca href=\"https://github.com/42School/norminette/blob/master/pdf/en.norm.pdf\" target=\"_blank\"\u003eNorm\u003c/a\u003e \u003c/p\u003e\nThe Norm  is a programming standard that defines a set of rules to follow when writing code at 42. It applies to all C projects within the Common Core by default, and\nto any project where it's specified. These are some of them:\n\n    Each function must be maximum 25 lines, not counting the function's own curly brackets.\n    \n    Each line must be at most 80 columns wide, comments included.\n    \n    A function can take 4 named parameters maximum.\n    \n    You can't declare more than 5 variables per function.\n    \n    You're not allowed to use: for , do...while , switch , case ,  goto  ,\n    ternary operators such as `?' and VLAs - Variable Length Arrays.\n  The norminette (as we call the norm at 42) is in python and open source.\n  \n  Its repository is available at https://github.com/42School/norminette.\n    \n\u003ch2 align=\"center\" id=\"how-does-it-work\"\u003e How does it work? \u003c/h2\u003e\n\nYou'll be able to play once you install the \u003ca href=\"https://github.com/42Paris/minilibx-linux\"\u003eMiniLibx\u003c/a\u003e features or if you're using one of the machines at 42.\n\nTo play, first compile the project with make:\n\n\tmake\n\t\nIn case you wanna play the pre-built maps:\n\n\tmake map1; make map2; make map3\n\t\nSo, run ./so_long followed by the map:\n\t\n\t./so_long maps/map1.ber\n\t\n\u003ch3 id=\"maps\" align=\"center\"\u003e Maps \u003c/h3\u003e   \nYou can parse any kind of map, as long as it respects the below rules:\n\nThe map must be a .ber file.\n\nAnd can only contain these characters:\n    \n| CHAR |\tOBJECT   |\n| --------- | ---------- |\n| 1         |   Wall     |\n| C\t    |   Food     |\n| E\t    |   Exit     |\n| P         |   Player   |      \n| 0         |   Floor    |\n    \nFor bonus there's an extra character - which makes you lose once touch it.\n    \n| CHAR |\tOBJECT   |\n| --------- | ---------- |\n| G         |   Deadly lake  |\n\n\nThe map must be rectangular and surrounded by walls '1'.\n\nThe map must contain at least one exit, one collectible, and one starting position.\n\nCheck some examples in the folder /assets/maps.\n\t\nAs in assets/maps/valid/map2.ber:\n\n\u003cimg src=\"https://user-images.githubusercontent.com/81205527/163024984-1ff511c1-17d2-4eef-8d97-90cc8a884c73.png\"\u003e\nThis .ber file generates this map:\n    \n    \n\u003cimg src=\"https://user-images.githubusercontent.com/81205527/174420150-0ee15e42-c7c3-4854-936b-fffaf13683c2.png\"\u003e\n\t\n\u003ch3 id=\"controls\" align=\"center\"\u003e Controls \u003c/h3\u003e   \n    \n| KEY |\tOBJECT   |\n| --------- | ---------- |\n| W or ⬆️        |    Move up   |\n| A\tor ⬅️        |    Move left |\n| S\tor ⬇️     |    Move down   |\n| D or ➡️       |   Move para right|      \n| Esc      |   Close the game     | \n    \n    \nUse WASD or arrow keys to move.\n\t\nYou can close the game by Clicking on the red cross on the window’s frame, or pressing Esc.\n\t\n\u003ch2 align=\"center\" id=\"how-do-i-test-it\"\u003e How do I test it? \u003c/h2\u003e  \n\nTo test the game itself it's recommendable to run it with some different maps and try things like:\n\nRunning into a wall and see if you're blocked or if the movements counter increase while you're stucked.\n\nGo to the exit withou collecting all the coins.\n\nGo through the same path at least one time.\n\nTry to move with the arrow keys and with WASD.\n\nCheck if the window closes when clicking the red cross on window's frame, same with Esc or Q.\n\nTry to minimize the window and open it again.\n\nRun the project with Valgrind to see if there's any memory leak.\n\nTo test some map validations as no map, missing argv, multiple argv, invalid extension, map with an empty line, invalid map parameter, missing W parameter, missing C parameter, missing E parameter, missing P parameter, extra P parameter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekkoz897%2F42cursus_so_long","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekkoz897%2F42cursus_so_long","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekkoz897%2F42cursus_so_long/lists"}