Crates.io | leafwing_input_playback |
lib.rs | leafwing_input_playback |
version | |
source | src |
created_at | 2022-11-13 21:21:55.754839 |
updated_at | 2024-12-05 17:42:07.042491 |
description | Input recording and mocking functionality for the Bevy game engine. |
homepage | https://leafwing-studios.com/ |
repository | https://github.com/leafwing-studios/leafwing_input_playback |
max_upload_size | |
id | 714519 |
Cargo.toml error: | TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
An input recording and playback library for the [Bevy] game engine in Rust. Test your games and applications without breaking a sweat. Support Tool Assisted Speedruns (TAS) effortlessly. Make crazy game mechanics where your player's inputs are echoed??
This crate currently captures the following input modes:
If you need more, please feel free to file an issue or open a PR!
If you're new to this crate, check out the input_playback
example to get a good overview of how it all works in practice.
This crate can be used to capture, save to disk, and then play back user inputs in a macro-like fashion. This serialization-based workflow is a natural (if somewhat brittle) fit for testing UI, app logic and gameplay elements of your Bevy apps.
Simply toggle on InputCapturePlugin
, set a PlaybackFilePath
, perform your inputs and then close the app.
Then, when evaluating tests, loop through each saved input sample, and run your app with the InputPlaybackPlugin
, providing a PlaybackFilePath
corresponding to the input sample you are testing.
AppExit
events are also captured, your tests will close down automatically when they're complete.