{"id":13571690,"url":"https://github.com/NiklasEi/bevy_game_template","last_synced_at":"2025-04-04T08:31:57.091Z","repository":{"id":37827051,"uuid":"353128532","full_name":"NiklasEi/bevy_game_template","owner":"NiklasEi","description":"Template for a Bevy game including CI/CD for web, Windows, Linux, macOS, iOS and Android","archived":false,"fork":false,"pushed_at":"2025-01-16T22:58:19.000Z","size":57350,"stargazers_count":921,"open_issues_count":10,"forks_count":92,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-30T14:05:59.905Z","etag":null,"topics":["bevy","bevy-engine","game-development","hacktoberfest","mobile-game","rust","template-project","web-game"],"latest_commit_sha":null,"homepage":"https://niklasei.github.io/bevy_game_template/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NiklasEi.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":"2021-03-30T20:10:04.000Z","updated_at":"2025-03-29T20:12:37.000Z","dependencies_parsed_at":"2023-10-14T21:03:44.646Z","dependency_job_id":"203e4bcc-d004-4ce1-ad2f-27d23b4f6949","html_url":"https://github.com/NiklasEi/bevy_game_template","commit_stats":null,"previous_names":[],"tags_count":39,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasEi%2Fbevy_game_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasEi%2Fbevy_game_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasEi%2Fbevy_game_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasEi%2Fbevy_game_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NiklasEi","download_url":"https://codeload.github.com/NiklasEi/bevy_game_template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247147507,"owners_count":20891714,"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":["bevy","bevy-engine","game-development","hacktoberfest","mobile-game","rust","template-project","web-game"],"created_at":"2024-08-01T14:01:05.028Z","updated_at":"2025-04-04T08:31:52.078Z","avatar_url":"https://github.com/NiklasEi.png","language":"Rust","funding_links":[],"categories":["Rust","Starters","Templates"],"sub_categories":["Helpers"],"readme":"# A Bevy game template\n\nTemplate for a Game using the awesome [Bevy engine][bevy] featuring out of the box builds for Windows, Linux, macOS, Web (Wasm), Android, and iOS.\n\n# What does this template give you?\n\n* small example [\"game\"](https://niklasei.github.io/bevy_game_template/)\n* easy setup for running the web build using [trunk] (`trunk serve`) \n* run the native version with `cargo run`\n* workflow for GitHub actions creating releases for Windows, Linux, macOS, and Web (Wasm) ready for distribution\n    * the same workflow creates development builds for the mobile platforms (two separate workflows can push to the stores after [some setup](#deploy-mobile-platforms))\n    * push a tag in the form of `v[0-9]+.[0-9]+.[0-9]+*` (e.g. `v1.1.42`) to trigger the flow\n    * WARNING: if you work in a private repository, please be aware that macOS and Windows runners cost more build minutes. **For public repositories the builds are free!**\n\n# How to use this template?\n\n 1. Click \"Use this template\" on the repository's page\n 2. Look for `ToDo` to use your own game name everywhere\n 3. [Update the icons as described below](#updating-the-icons)\n 4. Start coding :tada:\n    * Start the native app: `cargo run`\n    * Start the web build: `trunk serve`\n        * requires [trunk]: `cargo install --locked trunk`\n        * requires `wasm32-unknown-unknown` target: `rustup target add wasm32-unknown-unknown`\n        * this will serve your app on `8080` and automatically rebuild + reload it after code changes\n    * Start the android app: `cargo apk run -p mobile`\n        * requires following the instructions in the [bevy example readme for android setup][android-instructions]\n    * Start the iOS app (see the [bevy example readme for ios setup instructions][ios-instructions])\n        * Install Xcode through the app store\n        * Launch Xcode and install the iOS simulator (check the box upon first start, or install it through `Preferences \u003e Platforms` later)\n        * Install the iOS and iOS simulator Rust targets with `rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim`\n        * run `make run` inside the `/mobile` directory\n\nYou should keep the `credits` directory up to date. The release workflow automatically includes the directory in every build.\n\n### Updating the icons\n 1. Replace `build/macos/icon_1024x1024.png` with a `1024` times `1024` pixel png icon and run `create_icns.sh` or `create_icns_linux.sh` if you use linux (make sure to run the script inside the `build/macos` directory) - _Note: `create_icns.sh` requires a mac, and `create_icns_linux.sh` requires imagemagick and png2icns_\n 2. Replace `build/windows/icon.ico` (used for windows executable and as favicon for the web-builds)\n    * You can create an `.ico` file for windows by following these steps:\n       1. Open `macos/AppIcon.iconset/icon_256x256.png` in [Gimp](https://www.gimp.org/downloads/)\n       2. Select the `File \u003e Export As` menu item.\n       3. Change the file extension to `.ico` (or click `Select File Type (By Extension)` and select `Microsoft Windows Icon`)\n       4. Save as `build/windows/icon.ico`\n 3. Replace `build/android/res/mipmap-mdpi/icon.png` with `macos/AppIcon.iconset/icon_256x256.png`, but rename it to `icon.png`\n\n### Deploy web build to GitHub pages\n\n 1. Trigger the `deploy-github-page` workflow\n 2. Activate [GitHub pages](https://pages.github.com/) for your repository\n     1. Source from the `gh-pages` branch (created by the just executed action)\n 3. After a few minutes your game is live at `http://username.github.io/repository`\n\nTo deploy newer versions, just run the `deploy-github-page` workflow again.\n\n# Deploy mobile platforms\n\nFor general info on mobile support, you can take a look at [one of my blog posts about mobile development with Bevy][mobile_dev_with_bevy_2] which is relevant to the current setup.\n\n## Android\n\nCurrently, `cargo-apk` is used to run the development app. But APKs can no longer be published in the store and `cargo-apk` cannot produce the required AAB. This is why there is setup for two android related tools. In [`mobile/Cargo.toml`](./mobile/Cargo.toml), the `package.metadata.android` section configures `cargo-apk` while [`mobile/manifest.yaml`](./mobile/manifest.yaml) configures a custom fork of `xbuild` which is used in the `release-android-google-play` workflow to create an AAB.\n\nThere is a [post about how to set up the android release workflow][workflow_bevy_android] on my blog.\n\n## iOS\n\nThe setup is pretty much what Bevy does for the mobile example.\n\nThere is a [post about how to set up the iOS release workflow][workflow_bevy_ios] on my blog.\n\n# Removing mobile platforms\n\nIf you don't want to target Android or iOS, you can just delete the `/mobile`, `/build/android`, and `/build/ios` directories.\nThen delete the `[workspace]` section from `Cargo.toml`.\n\n# Getting started with Bevy\n\nYou should check out the Bevy website for [links to resources][bevy-learn] and the [Bevy Cheat Book] for a bunch of helpful documentation and examples. I can also recommend the [official Bevy Discord server][bevy-discord] for keeping up to date with the development and getting help from other Bevy users.\n\n# Known issues\n\nAudio in web-builds can have issues in some browsers. This seems to be a general performance issue and not due to the audio itself (see [bevy_kira_audio/#9][firefox-sound-issue]).\n\n# License\n\nThis project is licensed under [CC0 1.0 Universal](LICENSE) except some content of `assets` and the Bevy icons in the `build` directory (see [Credits](credits/CREDITS.md)). Go crazy and feel free to show me whatever you build with this ([@nikl_me][nikl-twitter] / [@nikl_me@mastodon.online][nikl-mastodon] ).\n\n[bevy]: https://bevyengine.org/\n[bevy-learn]: https://bevyengine.org/learn/\n[bevy-discord]: https://discord.gg/bevy\n[nikl-twitter]: https://twitter.com/nikl_me\n[nikl-mastodon]: https://mastodon.online/@nikl_me\n[firefox-sound-issue]: https://github.com/NiklasEi/bevy_kira_audio/issues/9\n[Bevy Cheat Book]: https://bevy-cheatbook.github.io/introduction.html\n[trunk]: https://trunkrs.dev/\n[android-instructions]: https://github.com/bevyengine/bevy/blob/latest/examples/README.md#setup\n[ios-instructions]: https://github.com/bevyengine/bevy/blob/latest/examples/README.md#setup-1\n[mobile_dev_with_bevy_2]: https://www.nikl.me/blog/2023/notes_on_mobile_development_with_bevy_2/\n[workflow_bevy_android]: https://www.nikl.me/blog/2023/github_workflow_to_publish_android_app/\n[workflow_bevy_ios]: https://www.nikl.me/blog/2023/github_workflow_to_publish_ios_app/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNiklasEi%2Fbevy_game_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNiklasEi%2Fbevy_game_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNiklasEi%2Fbevy_game_template/lists"}