Giter Site home page Giter Site logo

battle-city's Introduction

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 存储。

battle-city's People

Contributors

lewiszlw avatar nkdark avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.