Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexichepura/bevy_garage

Gamelike car simulation playground.
https://github.com/alexichepura/bevy_garage

bevy bevy-engine deepqlearning gamedev neural-networks racing rapier3d rust simulation wasm

Last synced: 12 days ago
JSON representation

Gamelike car simulation playground.

Awesome Lists containing this project

README

        

# bevy_garage - gamelike car simulation playground

![Bevy Garage 0.6 screenshot 2023-05-24](https://github.com/alexichepura/bevy_garage/assets/5582266/264f622c-d98c-46c5-9eac-f195cbae2796)
![Bevy Garage 0.6 iphone xs screenshot 2023-05-24](https://github.com/alexichepura/bevy_garage/assets/5582266/3300fb5e-0618-42b6-9fa3-d4a8397067c9)
![Bevy Garage Overture Maps](https://github.com/alexichepura/bevy_garage/assets/5582266/fb0f5d6e-b779-4155-bfdd-8f312ecaca7e)

Introductory walk-through \
Deep Q-Learning car training for 1 hour \
Wasm demo
- game engine
- rigid body physics
- kenney assets
- neural network
- api server and client
- db client
- sound &
- virtual joystick

## Run

```sh
brew install llvm # macos
sudo apt-get install lld # ubuntu
sudo pacman -S lld # arch
```

```sh
cargo run --release
# or faster compile
cargo run --release --features bevy/dynamic_linking
```

## Neural network
```sh
cargo r -r --features="nn"
```

### Api server for neural network (optional)
```sh
# generate prisma db client
cargo prisma generate
# push schema to database
cargo prisma db push
# run api server
cd api && cargo r -r
# run app with saving replay buffer
cargo r -r --features="nn,nn_api"
# prisma studio https://github.com/Brendonovich/prisma-client-rust/issues/96
npx prisma studio
```

## Key bindings

- UP, DOWN, LEFT, RIGHT - drive
- 1, 2, 3, 4, 5 - camera views
- 0 - free camera with WASDQE(SHIFT) control and mouse
- R - debug mode
- SHIFT+SPACE - respawn at random position
- N - toggle nn
- H, J, K, L - directed light control
- X - enable sound, Z - decrease volume, C - increase volume

## History

- Deep Q learning NN -
- First attempts with NN -

![Bevy Garage 0.3 screenshot 2023-03-25](https://user-images.githubusercontent.com/5582266/227719005-d22da207-188c-4a6e-9582-68aa8616e9ca.jpg)
![Screenshot 2023-02-10](https://user-images.githubusercontent.com/5582266/218020620-d50663a7-a38f-4431-8abf-8d794e552b6f.jpeg)
![screenshot 2023-01-19](https://user-images.githubusercontent.com/5582266/214000445-8fa5ac99-2412-416e-9905-8640c8d51502.jpg)
![old screenshot 1](https://user-images.githubusercontent.com/5582266/188065552-f1abd35e-10f9-43fa-935e-3530f3292dde.png)
![old screenshot 2](https://user-images.githubusercontent.com/5582266/180704095-2d4d6819-0b35-4653-b8e6-a3a50f793a9c.png)
![old screenshot 3](https://user-images.githubusercontent.com/5582266/177758958-3ac7a6da-b178-45bf-a9f4-edb25de3008e.jpg)

## License

Bevy Garage is free, open source and permissively licensed!
Except where noted (below and/or in individual files), all code in this repository is dual-licensed under either:

- MIT License ([LICENSE-MIT](LICENSE-MIT) or [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT))
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0))

at your option.
This means you can select the license you prefer!
This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are [very good reasons](https://github.com/bevyengine/bevy/issues/2373) to include both.

## Your contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.