{"id":15137999,"url":"https://github.com/nightswatchgames/battle-city","last_synced_at":"2025-09-07T12:31:16.244Z","repository":{"id":147969742,"uuid":"568663821","full_name":"NightsWatchGames/battle-city","owner":"NightsWatchGames","description":"Classical battle-city game made with bevy engine.","archived":false,"fork":false,"pushed_at":"2024-12-25T02:53:03.000Z","size":2084,"stargazers_count":97,"open_issues_count":6,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T07:11:14.307Z","etag":null,"topics":["battle-city","bevy","game","rust"],"latest_commit_sha":null,"homepage":"https://nightswatchgames.github.io/games/battle-city/","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/NightsWatchGames.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":"2022-11-21T06:22:55.000Z","updated_at":"2025-03-05T07:48:47.000Z","dependencies_parsed_at":"2024-12-23T18:11:37.836Z","dependency_job_id":"4ba98f38-ee1e-41c4-81f1-c3c56c28c0bc","html_url":"https://github.com/NightsWatchGames/battle-city","commit_stats":{"total_commits":62,"total_committers":3,"mean_commits":"20.666666666666668","dds":0.06451612903225812,"last_synced_commit":"4bef811d62a293f6cca59fd2719e7d68b646b210"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightsWatchGames%2Fbattle-city","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightsWatchGames%2Fbattle-city/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightsWatchGames%2Fbattle-city/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightsWatchGames%2Fbattle-city/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NightsWatchGames","download_url":"https://codeload.github.com/NightsWatchGames/battle-city/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445669,"owners_count":20939958,"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":["battle-city","bevy","game","rust"],"created_at":"2024-09-26T07:04:12.766Z","updated_at":"2025-04-06T07:11:17.728Z","avatar_url":"https://github.com/NightsWatchGames.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[English](README_EN.md)\n\n# battle-city 坦克大战游戏\n- [x] LDTK软件编辑关卡\n- [x] 关卡载入\n- [x] 关卡切换\n- [x] 玩家定点和敌人随机点出生\n- [x] 利用物理引擎进行碰撞检测\n- [x] 玩家出生、护盾、爆炸、水波等精灵动画\n- [x] 游戏UI\n- [x] 游戏音效\n- [x] 暂停游戏\n- [x] 敌人AI实现\n- [x] 本地多人模式\n- [x] WASM支持\n\n在线游玩：[点这里](https://nightswatchgames.github.io/games/battle-city/)（电脑版Chrome/Firefox/Edge打开）\n\n## 运行\n1. 本地运行\n```\ncargo run\n```\n2. WASM运行\n```\nrustup target install wasm32-unknown-unknown\ncargo install wasm-server-runner\ncargo run --target wasm32-unknown-unknown\n```\n```\ncargo install wasm-bindgen-cli\ncargo build --release --target wasm32-unknown-unknown\nwasm-bindgen --out-dir ./out/ --target web ./target/wasm32-unknown-unknown/release/battle-city.wasm\n```\n\n## 游戏展示\n视频演示：[B站](https://www.bilibili.com/video/BV1fx4y1w7RC/)\n\n![start_menu](screenshots/start_menu.png)\n![game_playing](screenshots/game_playing.png)\n![game_over](screenshots/game_over.png)\n\n## 参考资料\n- [bevy-cheatbook](https://github.com/bevy-cheatbook/bevy-cheatbook)（[中文翻译](https://yiviv.com/bevy-cheatbook/)）\n- [Unity制作坦克大战](https://www.bilibili.com/video/BV1PW41197Su)\n- [Battle City - Wikipedia](https://en.wikipedia.org/wiki/Battle_City)\n\n## 问题\n**1.2d游戏角色改变方向时，通常是切换sprite还是进行sprite旋转？**\n\n**2.Sprite Sheet 和 Texture Atlas 理解和区别？**\nTexture Atlas 是指一张大图片（图集）包含多个texture，Sprite Sheet 通常是指一张大图片包含帧动画的每一帧（texture），实质上跟 Texture Atlas 一样。在 Bevy 0.10 中，帧动画（SpriteSheetBundle）也是直接使用 struct TextureAtlas 存储图集，并没有使用单独的 struct SpriteSheet 存储。\n- https://forum.unity.com/threads/sprite-atlas-vs-manual-sprite-sheet.1229424/\n- https://gamedev.stackexchange.com/questions/69895/what-is-the-difference-between-a-sprite-sheet-and-a-texture-atlas\n- https://docs.rs/bevy/latest/bevy/sprite/struct.TextureAtlas.html\n- https://docs.rs/bevy/latest/bevy/sprite/struct.SpriteSheetBundle.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightswatchgames%2Fbattle-city","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightswatchgames%2Fbattle-city","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightswatchgames%2Fbattle-city/lists"}