Giter Club home page Giter Club logo

bevy_combat's Introduction

Bevy Combat

crate_version crate_version

It's a bevy port of my ECS Combat Unity demo.

Check out the web demo in your browser. You can use the - and = keys to speed up and slow down time (make sure you have focussed the browser window).

demo scene

another scene

Added so far

  • Movement
  • Combat and targetting AI
  • Simple weapons (instant hit), damage, health and mortality
  • Death animations and explosions
  • Shields

Coming soon

  • More weapons
  • Combat calculations, e.g. weapon effectiveness.
  • Ship shaders
  • Fix bugs

Getting Started

To build and deploy for web:

cargo make serve

To run for pc:

cargo run

Building for web (fast)

Make sure you have added the wasm target to your toolchain:

rustup target add wasm32-unknown-unknown

If you do not have wasm-server-runner, install it via

cargo install wasm-server-runner

Afterwards, you can build and run in your browser:

cargo run --target wasm32-unknown-unknown

For more info on web deployment, see the bevy book.

Building for itch.io

Following these instructions...

itch.io build requires

cargo install wasm-bindgen-cli

Build the wasm target, then run wasm-bindgen. After, optimize the generated .wasm:

cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --no-typescript --target web --out-dir ./out/ --out-name "game" ./target/wasm32-unknown-unknown/release/bevy_combat.wasm

If you want to optimize further:

wasm-bindgen --no-typescript --target web --out-dir ./out/ --out-name "preopt_game" ./target/wasm32-unknown-unknown/release/bevy_combat.wasm
wasm-opt -O -ol 100 -s 100 -o game.wasm preopt_game.wasm

Copy the assets folder to /out. Copy web/index.html to /out/index.html

Zip the out folder, upload to itch.io, and celebrate!

Credits

Credit for individual art assets can be found here.

bevy_combat's People

Contributors

elliotb256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bevy_combat's Issues

learning wondering

Hello bro, i feel confused in the package combat. In the Plugin system: add_effect and remove_old_effect, in my thought, these two system may work in the same update every times, the weapon entity effect may be created with component and this will be despawned
in the same update, but in the game it seems that can last until the animation finished. Looking forwoard to you reply bro.

bevy 0.6

I've ported this to bevy 0.6 and it runs (I'll push the branch when at my pc later).

However - bevy 0.6 introduced a bug in the sprite renderer, where we now cannot anisotropically scale a sprite, and then rotate it. This means that the laser beams can no longer be renderered correctly.

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.