{"id":21421411,"url":"https://github.com/percival33/sokoban","last_synced_at":"2025-03-16T20:14:04.462Z","repository":{"id":40667330,"uuid":"457103007","full_name":"Percival33/sokoban","owner":"Percival33","description":"College assignment to create Sokoban game using SDL","archived":false,"fork":false,"pushed_at":"2022-06-27T16:17:27.000Z","size":1790,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T06:44:58.106Z","etag":null,"topics":["cpp","game","sdl2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"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/Percival33.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-08T21:03:48.000Z","updated_at":"2024-04-12T15:39:38.000Z","dependencies_parsed_at":"2022-08-27T01:01:53.627Z","dependency_job_id":null,"html_url":"https://github.com/Percival33/sokoban","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/Percival33%2Fsokoban","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Percival33%2Fsokoban/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Percival33%2Fsokoban/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Percival33%2Fsokoban/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Percival33","download_url":"https://codeload.github.com/Percival33/sokoban/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926072,"owners_count":20369910,"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":["cpp","game","sdl2"],"created_at":"2024-11-22T20:34:08.737Z","updated_at":"2025-03-16T20:14:04.441Z","avatar_url":"https://github.com/Percival33.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n# Sokoban game :video_game:\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#goal-of-game\"\u003eGoal of game\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#how-to-play\"\u003eHow to play?\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#level-customization\"\u003eLevel customization\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#game-screenshots\"\u003eGame screenshots\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\n\u003c!-- screenshot --\u003e\n\nThis was a college project, to implement own version of classic [sokoban](https://en.wikipedia.org/wiki/Sokoban) game. To achive GUI utility, SDL library was used with given template.\n\n![](https://upload.wikimedia.org/wikipedia/commons/4/4b/Sokoban_ani.gif)\n\n### Goal of game\npush all crates to designated places in the least amount of moves.\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n### Built With\nThis project was built with \n* [cmake](https://cmake.org/)\n* [SDL](https://www.libsdl.org/)\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nTo get a local copy up and running follow these simple example steps.\n\n### Prerequisites\n\nThis is an example of how to list things you need to use the software and how to install them.\n* SDL\n* CMake\n\n### Installation\n\n1. Download and compile [SDL](https://www.libsdl.org/download-2.0.php).\n2. Download and setup [cmake](https://cmake.org/download/)\n3. Clone the repo \u0026 change directory\n   ```sh\n   git clone https://github.com/Percival33/sokoban.git\n   cd sokoban\n   ```\n4. Move SDL folder to sokoban directory \u0026 rename it to `SDL2`\n5. Create `build` directory\n   ```sh\n   mkdir build\n   cd build\n   ```\n6. Run cmake to compile project\n   ```sh\n   cmake ../.\n   cmake --build .\n   ```\n7. Start game\n   ```sh\n   ./sokoban\n   ```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n### How to play?\nTo start game, run the program. Then use arrow keys to move around board. To push crate you need to move player onto crate's position.\n\nAfter moving all crates to final positions, final screen is showing up and game freezes for 3 seconds.\n\nTo play on different level replace name of your level on line **21** of **src/game.cpp**. See this [link](https://github.com/Percival33/sokoban/blob/6f37e4799461fe58ff5209c991d976a23e4bdef1/src/game.cpp#L21)\n```cpp\nconst char LEVEL_NAME[] = \"level2\";\n```\n### Keyboard shortcuts:\n* `ESC` to end game\n* `n` to restart game\n* `arrow keys` to move around\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Level customization\nTo create your own level, create `your_level_name.txt` file. See [level1.txt](levels/level1.txt) as reference.\nStructure of file:\n```\nn m\nBOARD\nx y\n```\nwhere:\n* `n`- number of rows\n* `m` - number of columns\n* `BOARD`:\n  'x' - crate destination position\n  'c' - crate position\n  '#' - wall\n* `x` - x postion of player, number 1 \u003c= x \u003c= m\n* `y` - y position of player, number 1 \u003c= y \u003c= n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Game screenshots\n\n![starting-position-screenshot!](images/start_position.png \"New game\")\n![last-postion-screenshot!](images/last_chest.png \"Last chest\")\n![final-screenshot!](images/final.png \"winning screen\")\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n- [x] Add images\n- [x] About project section\n- [x] Add level customization\n- [x] Finish installation section\n- [x] Update Usage section\n\nSee the [open issues](https://github.com/Percival33/sokoban/issues) for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n## Acknowledgments\n\nUse this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!\n\n* [Assets author - Kenny](https://www.kenney.nl)\n* [readme template](https://github.com/othneildrew/Best-README-Template)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[starting-position-screenshot]: images/start_position.png\n[last-postion-screenshot]: images/last_chest.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpercival33%2Fsokoban","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpercival33%2Fsokoban","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpercival33%2Fsokoban/lists"}