An ability / resource / cooldown management library for Bevy.

Overview

About

leafwing-abilities is an opinionated, ready-to-use Bevy library and plugin for handling abilities. It features:

  • cooldown tracking
  • resource management
  • a battle-tested, coherent structure for writing your own ability logic

Roleplaying games, and particularly Diablo-like action RPGs are the primary target, but you may find it useful for platformers, turn-based RPGs, real-time strategy games and games looking for MOBA-style gameplay.

Instructions

Finally:

  1. Rename the lib and bin in Cargo.toml (and all imports to ensure your code compiles).
  2. Double check that the LICENSE matches your intent.
  3. Update this README to match your project, modifying About, Getting Started and other sections as needed.

Running examples

To run an example, use cargo run --example_name, where example_name is the file name of the example without the .rs extension.

This repo is set up to always build with full optimizations, so there's no need for a --release flag in most cases. Dynamic linking is enabled to ensure build times stay snappy.

Contributing

This repository is open to community contributions! There are a few options if you'd like to help:

  1. File issues for bugs you find or new features you'd like.
  2. Read over and discuss issues, then make a PR that fixes them. Use "Fixes #X" in your PR description to automatically close the issue when the PR is merged.
  3. Review existing PRs, and leave thoughtful feedback. If you think a PR is ready to merge, hit "Approve" in your review!

Any contributions made are provided under the licenses (standard MIT + Apache) listed in this repo at the time of their contribution, and do not require separate attribution.

Testing

  1. Use doc tests aggressively to show how APIs should be used. You can use # to hide a setup line from the doc tests.
  2. Unit test belong near the code they are testing. Use #[cfg(test)] on the test module to ignore it during builds, and #[test] on the test functions to ensure they are run.
  3. Integration tests should be stored in the top level tests folder, importing functions from lib.rs.

Use cargo test to run all tests.

CI

The CI will:

  1. Ensure the code is formatted with cargo fmt.
  2. Ensure that the code compiles.
  3. Ensure that (almost) all clippy lints pass.
  4. Ensure all tests pass on Windows, MacOS and Ubuntu.

Check this locally with:

  1. cargo run -p ci
  2. cargo test --workspace

To manually rerun CI:

  1. Navigate to the Actions tab.
  2. Use the dropdown menu in the CI run of interest and select "View workflow file".
  3. In the top-right corner, select "Rerun workflow".

Documentation

Reference documentation is handled with standard Rust doc strings. Use cargo doc --open to build and then open the docs.

Design docs (or other book-format documentation) is handled with mdBook. Install it with cargo install mdbook, then use mdbook serve --open to launch the docs.

Benchmarking

To run the benchmarks, use cargo bench.

For more documentation on making your own benchmarks, check out criterion's docs.

You might also like...
Here are a few cargo-generate templates for use when creating bevy applications
Here are a few cargo-generate templates for use when creating bevy applications

Bevy-template-rs Here are a few cargo-generate templates for use when creating bevy applications. Templates Game This is a template for starting a new

Composable Alternatives to Bevy's RunCriteria, States, FixedTimestep

Composable Alternatives to Bevy's RunCriteria, States, FixedTimestep This crate offers alternatives to the Run Criteria, States, and FixedTimestep sch

Inverse kinematics plugin for Bevy implementing the FABRIK algorithm.

Inverse kinematics plugin for Bevy implementing the FABRIK algorithm.

Rust library that can be reset if you think it's slow

GoodbyeKT Rust library that can be reset if you think it's slow

Simple library to host lv2 plugins. Is not meant to support any kind of GUI.

lv2-host-minimal Simple library to host lv2 plugins. Is not meant to support any kind of GUI. Host fx plugins (audio in, audio out) Set parameters Hos

Extreme fast factor expression & computation library for quantitative trading in Python.

Extreme fast factor expression & computation library for quantitative trading in Python.

Demo for the swash font library

Demo for the swash crate See the swash repo or crate for the actual project. This is a chunk of very rough code.

Agent library for Internet Computer, in Dart

An agent library built for Internet Computer, a plugin package for dart and flutter apps. Developers can build ones to interact with Dfinity's blockchain directly.

Totally Speedy Transmute (TST) is a library providing a small, performance oriented, safe version of std::mem::transmute

Totally Speedy Transmute An evil spiritual successor to Totally Safe Transmute What is it? Totally Speedy Transmute (TST) is a library providing a sma

Owner
null
Learn-rust - An in-depth resource to learn Rust 🦀

Learning Rust ?? Hello friend! ?? Welcome to my "Learning Rust" repo, a home for my notes as I'm learning Rust. I'm structuring everything into lesson

Lazar Nikolov 7 Jan 28, 2022
A example bevy application using bevy-kajiya for its renderer

☀️ bevy-kajiya playground A example bevy application using bevy-kajiya for its renderer NOTE: only tested on Windows. For more context, check out the

Sebastian Hamel 20 Dec 5, 2022
A Discord bot for control and decentralization of threads management

Threadripper-bot A Discord bot for control and decentralization of threads management About Threadripper aims to serve some extra utilities to take be

S0ra 15 Dec 27, 2022
Runit service management wrappers

void-svtools Basic wrappers for managing services for runit,

Isaac Hung 1 Aug 3, 2022
OpenEMC: open embedded management controller

OpenEMC OpenEMC is an open-source firmware implementing an embedded management controller (EMC) on an STM32F1 microcontroller. It consists of a bootlo

Sebastian Urban 5 Dec 25, 2022
Simplify temporary email management and interaction, including message retrieval and attachment downloads, using Rust.

Tempmail The Tempmail simplifies temporary email management and interaction, including message retrieval and attachment downloads, using the Rust prog

Dilshad 6 Sep 21, 2023
A collection of exponentially-smoothed camera controllers for the Bevy Engine.

smooth-bevy-cameras A collection of exponentially-smoothed camera controllers for the Bevy Engine. Look Transform All controllers are based on a LookT

Duncan 122 Dec 24, 2022
Bevy plugin to help implement loading states

This is a plugin for the Bevy game engine, to help you implement loading states.

Ida Iyes 70 Jan 7, 2023
ECS-friendly ldtk plugin for bevy, leveraging bevy_ecs_tilemap

bevy_ecs_ldtk An ECS-friendly ldtk plugin for bevy. Uses bevy_ecs_tilemap as a base. Not released yet, still in development. bevy_ecs_tilemap once sup

Trevor Lovell 247 Jan 10, 2023
Easier joystick, mouse and keyboard input handling in Bevy

Easier joystick, mouse and keyboard input handling in Bevy

Pedro Henrique 31 Dec 20, 2022