Game of Life-like simulations using wgpu.
A demo using the rust wgpu implementation of the WebGPU API to compute and render the Game of Life and Life-like simulations.
See the online version in a WebGPU capable browser at https://wgpu-game-of-life.fornwall.net or run a checkout locally using cargo run
.
It's based on WebGPU Samples, ported to rust and wgpu
(with the help of Learn Wgpu) and having some additional features for demonstration purposes. It uses winit for cross-platform windowing functionality.
Q
to go slower, W
to speed up-
/+
Left
/Right
arrowsUp
/Down
arrowsI
(web version only)Space
R
Tab
/C
(web version only)F
Use cargo-ndk to build and run (release builds requires the CARGO_APK_RELEASE_KEYSTORE
and CARGO_APK_RELEASE_KEYSTORE_PASSWORD
environment variables to be set).
make [RELEASE=1] build-android
: Build apk at target/[debug/release]/apk/wgpu-game-of-life.apk
make [RELEASE=1] run-android
: Run app on connected device or emulator.Run make run-ios-simulator
to run inside the iOS simulator.
Run make run-web
to build, serve and open the web version in a browser.