https://github.com/rust-arcade/bevy-rust-arcade
A plugin for the Bevy engine that allows you to easily make your games compatible with the Rust Arcade Machine.
https://github.com/rust-arcade/bevy-rust-arcade
arcade-machine game-development
Last synced: 7 months ago
JSON representation
A plugin for the Bevy engine that allows you to easily make your games compatible with the Rust Arcade Machine.
- Host: GitHub
- URL: https://github.com/rust-arcade/bevy-rust-arcade
- Owner: rust-arcade
- License: mit
- Created: 2022-06-16T15:36:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-08T22:29:58.000Z (almost 3 years ago)
- Last Synced: 2024-11-16T18:43:23.623Z (8 months ago)
- Topics: arcade-machine, game-development
- Language: Rust
- Homepage:
- Size: 57.7 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bevy-rust-arcade
A plugin for the [Bevy Engine](https://bevyengine.org/) that allows you to easily make your games compatible with Rust Arcade Machine. Learn more about the Rust Arcade project [here](https://twitter.com/carlosupina/status/1523715837726961664).

This plugin wraps the relevent Bevy gamepad events in more descriptive names specific to the arcade cabinet, according to the image below.

You can test these inputs without accessing the arcade machine by using an xbox controller, they are mapped accordingly to the buttons below.

Below is some simple code from the input example to get you started.
```rust
use bevy::prelude::*;
use bevy_rust_arcade::{ArcadeInputEvent, RustArcadePlugin};fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(RustArcadePlugin)
.add_system(arcade_event_system)
.run();
}// Read arcade input events
fn arcade_event_system(mut arcade_input_events: EventReader) {
for event in arcade_input_events.iter() {
info!(
"{:?} of {:?} is changed to {}",
event.arcade_input, event.gamepad, event.value
);
}
}```