Skip to content

NightsWatchGames/battle-city

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English

battle-city 坦克大战游戏

  • LDTK软件编辑关卡
  • 关卡载入
  • 关卡切换
  • 玩家定点和敌人随机点出生
  • 利用物理引擎进行碰撞检测
  • 玩家出生、护盾、爆炸、水波等精灵动画
  • 游戏UI
  • 游戏音效
  • 暂停游戏
  • 敌人AI实现
  • 本地多人模式
  • WASM支持

在线游玩:点这里(电脑版Chrome/Firefox/Edge打开)

运行

  1. 本地运行
cargo run
  1. WASM运行
rustup target install wasm32-unknown-unknown
cargo install wasm-server-runner
cargo run --target wasm32-unknown-unknown
cargo install wasm-bindgen-cli
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --out-dir ./out/ --target web ./target/wasm32-unknown-unknown/release/battle-city.wasm

游戏展示

视频演示:B站

start_menu game_playing game_over

参考资料

问题

1.2d游戏角色改变方向时,通常是切换sprite还是进行sprite旋转?

2.Sprite Sheet 和 Texture Atlas 理解和区别? Texture Atlas 是指一张大图片(图集)包含多个texture,Sprite Sheet 通常是指一张大图片包含帧动画的每一帧(texture),实质上跟 Texture Atlas 一样。在 Bevy 0.10 中,帧动画(SpriteSheetBundle)也是直接使用 struct TextureAtlas 存储图集,并没有使用单独的 struct SpriteSheet 存储。

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages