{"id":18763296,"url":"https://github.com/eiberham/snake","last_synced_at":"2025-09-25T16:45:28.016Z","repository":{"id":114971744,"uuid":"585200315","full_name":"eiberham/snake","owner":"eiberham","description":":snake: Classic snake game","archived":false,"fork":false,"pushed_at":"2023-09-17T23:49:32.000Z","size":6320,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T05:24:27.363Z","etag":null,"topics":["ggez","rust","snake","snake-game"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/eiberham.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-01-04T15:14:42.000Z","updated_at":"2023-03-09T04:28:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"caa1a847-f945-4ada-ac56-7df07b54f5e3","html_url":"https://github.com/eiberham/snake","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/eiberham%2Fsnake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiberham%2Fsnake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiberham%2Fsnake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiberham%2Fsnake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eiberham","download_url":"https://codeload.github.com/eiberham/snake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239661793,"owners_count":19676409,"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":["ggez","rust","snake","snake-game"],"created_at":"2024-11-07T18:25:38.631Z","updated_at":"2025-09-25T16:45:22.968Z","avatar_url":"https://github.com/eiberham.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snake game\n\nA implementation of the good old snake game in rust programming language using the [ggez](https://ggez.rs/) game library.\nThe sprite images were created with [aseprite](https://www.aseprite.org/).\n\n## Features: ##\n\n- A user friendly installer for different operating systems.\n- A menu screen and a game over screen with indications.\n- Different levels based on score.\n- The snake can go through bounds of playground and appear on the opposite side of the screen.\n- The fruit spawns in random positions in the playground.\n- Retro sound whenever the snake eats.\n\nHere's a screenshot of the game:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./snake.png\" alt=\"snake\" /\u003e\n\u003c/p\u003e\n\n![](https://img.shields.io/github/languages/code-size/eiberham/snake?style=flat-square)\n![](https://img.shields.io/github/license/eiberham/snake?style=flat-square)\n![](https://img.shields.io/github/stars/eiberham/snake?style=flat-square)\n[![Build Status](https://github.com/eiberham/snake/workflows/CI/badge.svg?branch=main)](https://github.com/eiberham/snake/actions?query=branch%3main)\n\n## :video_game: Controls\n\nTo play, use arrow keys to move the snake around the screen. It eats anything but you will only get points for eating the fruit. Use `escape` to quit the game.\n### How to run it locally :question:\n\nRun the following commands on the terminal:\n\n```shell\nfoo@bar:~$ git clone https://github.com/eiberham/snake.git\nfoo@bar:~$ cd snake\nfoo@bar:~$ cargo run\n```\n\n### Create an installer for mac\n\nThis is the way I managed to build the app's bundle and create a `.dmg` file, following the [documentation](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/20001119-110730) you can get an idea of how the bundle folder structure is.\n\nSimply run the `build_mac.sh` script within the project's folder, you'll get a `.dmg` file within the bundle_mac folder:\n\n```shell\nfoo@bar:~$ sh build_mac.sh\n```\n\nNow you can share it with any friend, acquaintance or whoever owns a mac.\n\n### What about windows :question:\n\nFor windows machines we can use cargo wix crate.\nBut before doing so we have to run the `build_win.sh` script that is on the root folder.\n\n```shell\nfoo@bar:~$ sh build_win.sh\n```\n\nNext install the wix toolset from [here](https://github.com/wixtoolset/wix3/releases)\n\nOpen a command prompt `windows + r` on your machine and run the following commands:\n\n```dos\nC:\\\u003e cargo install cargo-wix\nC:\\\u003e cd snake\nC:\\snake\\\u003e cargo wix init\nC:\\snake\\\u003e cargo wix\n```\n\nThe windows installer (msi) for the game will be in the C:\\snake\\target\\wix folder.\n\n### What about gnu/linux :question:\n\nSimple, by using `cargo-deb`.\n\nThis will only work for debian and debian based distros, so in order to create a `.deb` file you ought to install the cargo deb dependency and the specific target to compile to. Check out the targets available by running `rustc --print target-list`. i.e:\n\n```shell\nfoo@bar:~$ rustup update\nfoo@bar:~$ cargo install cargo-deb\nfoo@bar:~$ rustup target add i686-unknown-linux-gnu\nfoo@bar:~$ cargo deb --target=i686-unknown-linux-gnu\n```\n\nNow you should have a `.deb` package ready to be installed in a debian based linux distro. Remember that you can install it by using `dpkg -i package.deb` command.\n\nUpon running the above commands successfully you should have the debian package placed in the `target/i686-unknown-linux-gnu` directory.\n\n### :trollface: Where to download it from ?\n\n- Download for mac :green_apple: [here](https://storage.cloud.google.com/eiberham/Snake.zip?pli=1)\n\n## :pushpin: License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiberham%2Fsnake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feiberham%2Fsnake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiberham%2Fsnake/lists"}