Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 29 days 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-08T22:29:58.000Z (over 2 years ago)
- Last Synced: 2024-11-16T18:43:23.623Z (2 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).
![arcade-cabinet](assets/arcade_cabinet.gif)
This plugin wraps the relevent Bevy gamepad events in more descriptive names specific to the arcade cabinet, according to the image below.
![arcade-input-diagram](assets/arcade_input_diagram.png)
You can test these inputs without accessing the arcade machine by using an xbox controller, they are mapped accordingly to the buttons below.
![xbox-diagram](assets/xbox_diagram.png)
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
);
}
}```