diff --git a/README.md b/README.md index 7dc61f6..07aa087 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ # skywalker2088 吸血鬼幸存者类型游戏,宇宙科幻废土,玩家驾驶飞船在宇宙中漫游,打怪收集装备升级飞船,研究科技,探索文明的遗迹。 + ______ # 0. 简介 - 游戏类型:吸血鬼幸存者like - 游戏背景:玩家是一名太空巡警,在一次巡逻任务中发现了一艘海盗船,在追捕过程中意外地被一个黑洞吸入,进入到一个宇宙遗迹中,这个宇宙的编号是2088, 为了回到自己所在的宇宙空间,玩家需要驾驶太空飞船打怪、搜集装备、研究科技、探索文明的遗迹,在这个过程中玩家逐渐揭开这个宇宙文明毁灭的 真相,他需要尽快想办法回到自己所在的宇宙,将2088的案例带给宇宙科学家们,也许他们有办法避免自己宇宙的文明走向崩坏。 + ______ # 1. 玩法设计 1. 能量收集:太空飞船拥有将太空矿石转化成能量的转化内核,也能吸收转化太空怪物身上的能量晶核,这些能量为飞船提供源源不断的能源供给和升级所需的能量; @@ -13,6 +15,7 @@ ______ 3. 科技研究:通过对文明遗迹的探索,玩家可以收集科技点,解锁科技树,使太空飞船拥有更加强大的技能,比如激光射线、引力波探测器、无人机集群、超能粒子炮…… 4. 文明遗迹:随着等级提升,玩家可以探索更加高级且危险的文明遗迹,从而获取更加强大的内核,更多的能量和科技点; 5. 美术风格:太空、科幻、废土、文明遗迹。 + ## 1.1 操作 1. 移动:鼠标左键为飞船导航(TODO:键盘方向键和手柄摇杆支持) 2. 暂停/恢复:键盘空格键(TODO:手柄Start按键) @@ -36,17 +39,24 @@ ______ - [x] 暂停游戏 - [x] WASM支持 - [x] 敌人AI实现 - +- [x] 游戏音效 ## 3.2 TODO List -- [ ] 支持手柄操作输入(我喜欢用手柄玩,没有手柄可以用键鼠) -- [ ] LDTK软件编辑关卡 +- [ ] 支持手柄操作输入(我喜欢用手柄玩,没有手柄可以用键鼠,考虑使用[leafwing-input-manager](https://github.com/leafwing-studios/leafwing-input-manager)插件) +- [ ] 多语言支持(先弄中英文双语,考虑使用[fluent](https://github.com/kgv/bevy_fluent)插件) +- [ ] [LDTK](https://github.com/Trouv/bevy_ecs_ldtk)软件编辑关卡 - [ ] 关卡载入 - [ ] 关卡切换 - [ ] 玩家定点和敌人随机点出生 - [ ] 利用物理引擎进行碰撞检测 - [ ] 玩家出生、护盾、爆炸、水波等精灵动画 - [ ] 游戏UI -- [ ] 游戏音效 - [ ] 游戏存档、读档、自动保存 - [ ] 本地多人模式 + +# 4. 开发指南 +游戏引擎:[Bevy](https://bevyengine.org/) +常用命令列表: +- Rust格式化: `cargo fmt` +- clippy提交检查:`cargo clippy --locked --workspace --all-targets --all-features -- --deny warnings` +- 本地开发运行:`cargo run` diff --git a/assets/audio/music/start_menu.ogg b/assets/audio/music/start_menu.ogg new file mode 100644 index 0000000..85cbb63 Binary files /dev/null and b/assets/audio/music/start_menu.ogg differ diff --git a/assets/audio/sound_effects/big_explosion.ogg b/assets/audio/sound_effects/big_explosion.ogg new file mode 100644 index 0000000..3853365 Binary files /dev/null and b/assets/audio/sound_effects/big_explosion.ogg differ diff --git a/assets/audio/sound_effects/bullet_explosion.ogg b/assets/audio/sound_effects/bullet_explosion.ogg new file mode 100644 index 0000000..c7faf78 Binary files /dev/null and b/assets/audio/sound_effects/bullet_explosion.ogg differ diff --git a/assets/audio/sound_effects/bullet_hit_1.ogg b/assets/audio/sound_effects/bullet_hit_1.ogg new file mode 100644 index 0000000..fa896a2 Binary files /dev/null and b/assets/audio/sound_effects/bullet_hit_1.ogg differ diff --git a/assets/audio/sound_effects/bullet_hit_2.ogg b/assets/audio/sound_effects/bullet_hit_2.ogg new file mode 100644 index 0000000..1138ccb Binary files /dev/null and b/assets/audio/sound_effects/bullet_hit_2.ogg differ diff --git a/assets/audio/sound_effects/game_over.ogg b/assets/audio/sound_effects/game_over.ogg new file mode 100644 index 0000000..f530490 Binary files /dev/null and b/assets/audio/sound_effects/game_over.ogg differ diff --git a/assets/audio/sound_effects/game_pause.ogg b/assets/audio/sound_effects/game_pause.ogg new file mode 100644 index 0000000..eaf752e Binary files /dev/null and b/assets/audio/sound_effects/game_pause.ogg differ diff --git a/assets/audio/sound_effects/mode_switch.ogg b/assets/audio/sound_effects/mode_switch.ogg new file mode 100644 index 0000000..b24c9ed Binary files /dev/null and b/assets/audio/sound_effects/mode_switch.ogg differ diff --git a/assets/audio/sound_effects/player_fire.ogg b/assets/audio/sound_effects/player_fire.ogg new file mode 100644 index 0000000..2136c2f Binary files /dev/null and b/assets/audio/sound_effects/player_fire.ogg differ diff --git a/assets/audio/sound_effects/powerup_appear.ogg b/assets/audio/sound_effects/powerup_appear.ogg new file mode 100644 index 0000000..3a86ebf Binary files /dev/null and b/assets/audio/sound_effects/powerup_appear.ogg differ diff --git a/assets/audio/sound_effects/powerup_pick.ogg b/assets/audio/sound_effects/powerup_pick.ogg new file mode 100644 index 0000000..b5e1897 Binary files /dev/null and b/assets/audio/sound_effects/powerup_pick.ogg differ diff --git a/assets/audio/sound_effects/step1.ogg b/assets/audio/sound_effects/step1.ogg deleted file mode 100644 index 963c1cf..0000000 Binary files a/assets/audio/sound_effects/step1.ogg and /dev/null differ diff --git a/assets/audio/sound_effects/step2.ogg b/assets/audio/sound_effects/step2.ogg deleted file mode 100644 index e1cec9f..0000000 Binary files a/assets/audio/sound_effects/step2.ogg and /dev/null differ diff --git a/assets/audio/sound_effects/step3.ogg b/assets/audio/sound_effects/step3.ogg deleted file mode 100644 index 69b8aa0..0000000 Binary files a/assets/audio/sound_effects/step3.ogg and /dev/null differ diff --git a/assets/audio/sound_effects/step4.ogg b/assets/audio/sound_effects/step4.ogg deleted file mode 100644 index 9eb5344..0000000 Binary files a/assets/audio/sound_effects/step4.ogg and /dev/null differ diff --git a/assets/fonts/song_GB2312.ttf b/assets/fonts/song_GB2312.ttf new file mode 100644 index 0000000..16eb427 Binary files /dev/null and b/assets/fonts/song_GB2312.ttf differ diff --git a/src/enemy/drone.rs b/src/enemy/drone.rs index 4ef1496..0e7eaac 100644 --- a/src/enemy/drone.rs +++ b/src/enemy/drone.rs @@ -18,7 +18,7 @@ pub fn spawn_drone(commands: &mut Commands, fonts: &Res, position: Vec3) ShipBundle { glyph: Text2dBundle { text: Text::from_section( - "c", + "米", TextStyle { font: fonts.primary.clone(), font_size: 18.0, diff --git a/src/enemy/drone_boss.rs b/src/enemy/drone_boss.rs index 17e2dd5..547839b 100644 --- a/src/enemy/drone_boss.rs +++ b/src/enemy/drone_boss.rs @@ -17,7 +17,7 @@ pub fn spawn_drone_boss(commands: &mut Commands, fonts: &Res, position: V ShipBundle { glyph: Text2dBundle { text: Text::from_section( - "C", + "冞", TextStyle { font: fonts.primary.clone(), font_size: 32.0, diff --git a/src/enemy/fighter.rs b/src/enemy/fighter.rs index 7f69963..920bd3f 100644 --- a/src/enemy/fighter.rs +++ b/src/enemy/fighter.rs @@ -18,7 +18,7 @@ pub fn spawn_fighter(commands: &mut Commands, fonts: &Res, position: Vec3 ShipBundle { glyph: Text2dBundle { text: Text::from_section( - "w", + "W", TextStyle { font: fonts.primary.clone(), font_size: 18.0, diff --git a/src/enemy/mothership.rs b/src/enemy/mothership.rs index ae852c9..e66ea9a 100644 --- a/src/enemy/mothership.rs +++ b/src/enemy/mothership.rs @@ -18,7 +18,7 @@ pub fn spawn_mothership(commands: &mut Commands, fonts: &Res, position: V ShipBundle { glyph: Text2dBundle { text: Text::from_section( - "@", + "王", TextStyle { font: fonts.primary.clone(), font_size: 60.0, diff --git a/src/gameplay/gamelogic.rs b/src/gameplay/gamelogic.rs index ca6b715..38f2618 100644 --- a/src/gameplay/gamelogic.rs +++ b/src/gameplay/gamelogic.rs @@ -6,7 +6,7 @@ use crate::gameplay::player::IsPlayer; use crate::gameplay::GameState; use crate::screens::AppState; use crate::ship::bullet::{ExplosionRender, ShouldDespawn}; -use crate::ship::platform::Fonts; +use crate::ship::platform::{play_sound_effects, Fonts, SoundAssets}; use crate::util::{Colour, Math, RenderLayer}; use crate::{AppSet, CameraShake, MainCamera}; use bevy::app::App; @@ -184,6 +184,7 @@ pub fn combat_system( mut commands: Commands, time: Res