{"id":14235660,"url":"https://github.com/johnthagen/rust-belt","last_synced_at":"2025-04-15T06:15:40.342Z","repository":{"id":10628644,"uuid":"66409901","full_name":"johnthagen/rust-belt","owner":"johnthagen","description":":rocket: Asteroids-like arcade game implemented in Rust ✨","archived":false,"fork":false,"pushed_at":"2024-04-03T11:07:09.000Z","size":12064,"stargazers_count":76,"open_issues_count":11,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-15T06:15:33.786Z","etag":null,"topics":["arcade-game","graphics","opengl","piston","rust","video-game"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/johnthagen.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":"2016-08-23T23:02:58.000Z","updated_at":"2025-03-22T19:57:36.000Z","dependencies_parsed_at":"2024-04-02T12:43:15.859Z","dependency_job_id":"0f41f30d-940c-4a89-a0cd-fb436119b467","html_url":"https://github.com/johnthagen/rust-belt","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnthagen%2Frust-belt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnthagen%2Frust-belt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnthagen%2Frust-belt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnthagen%2Frust-belt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnthagen","download_url":"https://codeload.github.com/johnthagen/rust-belt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016641,"owners_count":21198833,"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":["arcade-game","graphics","opengl","piston","rust","video-game"],"created_at":"2024-08-20T21:02:14.875Z","updated_at":"2025-04-15T06:15:40.324Z","avatar_url":"https://github.com/johnthagen.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"![Rust Belt](./assets/images/rust-belt-logo.png)\n\n[![GitHub Actions][github-actions-badge]](https://github.com/johnthagen/rust-belt/actions)\n[![GitHub Releases][github-release-svg]][github-release]\n\n`rust-belt` is a 2D video game inspired by the classic \n[Asteroids](https://en.wikipedia.org/wiki/Asteroids_(video_game)) arcade game, \nfeaturing an [original soundtrack :musical_score:](assets/music). It is implemented using the \n[Rust](https://www.rust-lang.org/) game engine, [Piston](https://www.piston.rs/).\n\n![Rust Belt](./videos/rust-belt-game-play.gif)\n\n# Requirements\n\n## Prerequisites\n\n1. The latest stable release of Rust.\n    1. Install [`rustup`](https://www.rust-lang.org/install.html).\n\n2. `rust-belt` uses [`piston-music`](https://github.com/PistonDevelopers/music) to play music. \n    `piston-music` depends on two third-party non-Rust libraries, [SDL2](https://www.libsdl.org/) \n    and [SDL2_mixer](https://github.com/libsdl-org/SDL_mixer). Install instructions are provided\n    below.\n\n## Windows\n\nSelect to proceed with either the MSVC or GNU toolchain.\n\n### MSVC (Recommended)\n\n1. Ensure you are using the latest stable 64-bit MVSC toolchain with `rustup show` \n   (`stable-x86_64-pc-windows-msvc`).\n2. Ensure you have installed the [Build Tools for Visual Studio](https://aka.ms/buildtools)\n   as instructed by `rustup` during install.\n3. [Download](https://github.com/libsdl-org/SDL/releases) the latest 2.0.x SDL2 MSVC development\n   library (`SDL2-devel-2.0.x-VC.zip`).\n4. Unpack and copy all `.lib` files from `SDL2-devel-2.0.x-VC\\SDL2-2.0.x\\lib\\x64\\` into a folder. \n   If the `LIB` system environment variable does not exist, create it. Add that folder path to \n   `LIB`.\n5. Copy `SDL2.dll` into the `rust-belt` project folder, next to `Cargo.toml`.\n6. [Download](https://www.libsdl.org/projects/SDL_mixer/release/) the latest 2.0.x SDL2_mixer MSVC\n   development library (`SDL2_mixer-devel-2.0.x-VC.zip`).\n7. Unpack and copy all `.lib` files from `SDL2_mixer-devel-2.0.x-VC\\SDL2_mixer-2.0.x\\lib\\x64` into \n   the same folder added in step 4 that was added to the `LIB` system environment variable.\n8. Copy `SDL2_mixer.dll` and `libmpg123-0.dll` into the `rust-belt` project folder, next to \n   `Cargo.toml`.\n\n### GNU/MinGW-w64\n\n1. Ensure you using the latest stable 64-bit GNU ABI toolchain with `rustup show` \n   (`stable-x86_64-pc-windows-gnu`).\n2. Install [MSYS2](https://www.msys2.org/).\n3. In an MSYS2 terminal: `pacman --sync mingw-w64-x86_64-gcc`\n4. Add `C:\\msys64\\mingw64\\bin` to system `PATH`.\n5. [Download](https://github.com/libsdl-org/SDL/releases) the latest 2.0.x SDL2 MinGW development\n   library (`SDL2-devel-2.0.x-mingw.tar.gz`).\n6. Unpack and copy all `.lib` files from `SDL2-devel-2.0.x-mingw\\SDL2-2.0.x\\x86_64-w64-mingw32\\lib`\n   into a folder. If the `LIBRARY_PATH` system environment variable does not exist, create it. Add \n   that folder to `LIBRARY_PATH`.\n7. Copy `SDL2.dll` into the `rust-belt` project folder, next to `Cargo.toml`.\n8. [Download](https://www.libsdl.org/projects/SDL_mixer/release/) the latest 2.0.x SDL2_mixer MinGW\n   development library (`SDL2_mixer-devel-2.0.x-mingw.tar.gz`).\n9. Unpack and copy all `.lib` files from \n   `SDL2_mixer-devel-2.0.x-mingw\\SDL2_mixer-2.0.x\\x86_64-w64-mingw32\\lib\\` into the same folder \n   added in step 6 that was added to the `LIB` system environment variable.\n10. Copy `SDL2_mixer.dll` and `libmpg123-0.dll` into the `rust-belt` project folder, next to \n    `Cargo.toml`.\n\n## Mac OSX\n\n1. Install [Homebrew](https://brew.sh/) (by default this will install `gcc` via Xcode development \n   tools).\n2. `brew install sdl2`\n3. `brew install sdl2_mixer --with-flac --with-fluid-synth --with-libmikmod --with-mpg123`\n\n## Ubuntu\n\n1. `sudo apt install libsdl2-dev libsdl2-mixer-dev`\n\n## Build and Run\n\nTo build:\n\n```bash\n$ cargo build\n```\n\nTo run:\n\n```bash\n$ cargo run --release\n```\n\n## How to Play\n\nKeyboard         | Menu        | Game\n---------------- | ----------- | -------------------\n\u003ckbd\u003eW\u003c/kbd\u003e     | Up          | Accelerate Forward \n\u003ckbd\u003eS\u003c/kbd\u003e     | Down        | Accelerate Backward\n\u003ckbd\u003eA\u003c/kbd\u003e     |             | Rotate left\n\u003ckbd\u003eD\u003c/kbd\u003e     |             | Rotate right\n\u003ckbd\u003eSpace\u003c/kbd\u003e | Select      | Shoot\n\u003ckbd\u003eX\u003c/kbd\u003e     |             | Return to Menu\n\u003ckbd\u003eEsc\u003c/kbd\u003e   | Exit        | Exit\n\n# Maintainers\n\n* [@johnthagen](https://github.com/johnthagen)\n* [@mcdenhoed](https://github.com/mcdenhoed)\n\nSpecial thanks to [@aochagavia](https://github.com/aochagavia) for \n[rocket](https://github.com/aochagavia/rocket), which provided many examples to pull from.\n\n## Music\n\nMusic composed by [@johnthagen](https://github.com/johnthagen).  All rights reserved.\n\nSound from [freesound.org](https://www.freesound.org/).\n\n\u003c!-- Badges --\u003e\n\n[github-actions-badge]: https://github.com/johnthagen/rust-belt/workflows/build/badge.svg\n\n[github-release]: https://github.com/johnthagen/rust-belt/releases\n[github-release-svg]: https://img.shields.io/github/release/johnthagen/rust-belt.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnthagen%2Frust-belt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnthagen%2Frust-belt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnthagen%2Frust-belt/lists"}