Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lloydmeta/gol-rs
Conway's Game of Life in Rust + OpenGL
https://github.com/lloydmeta/gol-rs
game-of-life gfx gfx-rs opengl parallel-processing rayon rust
Last synced: 3 months ago
JSON representation
Conway's Game of Life in Rust + OpenGL
- Host: GitHub
- URL: https://github.com/lloydmeta/gol-rs
- Owner: lloydmeta
- License: mit
- Created: 2017-06-13T17:55:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-17T11:47:53.000Z (about 1 year ago)
- Last Synced: 2024-09-30T15:50:29.971Z (4 months ago)
- Topics: game-of-life, gfx, gfx-rs, opengl, parallel-processing, rayon, rust
- Language: Rust
- Size: 2.75 MB
- Stars: 5
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Game of Life [![CI](https://github.com/lloydmeta/gol-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/lloydmeta/gol-rs/actions/workflows/ci.yml)
Conway's Game of Life implemented in Rust and OpenGL via [`gfx-rs`](https://github.com/gfx-rs).
Done as an exercise to practise Rust and get my feet with with OpenGL.
Areas explored:
* General rendering
* Vertex, fragment shaders
* [Pipeline state objects](https://gfx-rs.github.io/2016/01/22/pso.html)
* [Rayon](https://github.com/nikomatsakis/rayon) for parallel processing
* Building and deploying cross-platform binaries via GH Actions![gol running](gol.gif)
## Usage
You can run the executable by downloading one of the binaries in [releases](https://github.com/lloydmeta/gol-rs/releases), or
via `cargo install gol`, then running `gol`, or if you've cloned the repo,`cargo run`.```bash
OPTIONS:
-h, --grid-height Height of the grid [default: 80]
-w, --grid-width Width of the grid [default: 100]
-u, --update-rate Number of updates to the game board per second [default: 30]
--window-height Height of the window [default: 768]
--window-width Width of the window [default: 1024]
```If running via `cargo`, options need to be passed by appending `--`, i.e. `cargo run -- -h 10 -w 10`.
## Todo
* Optimise!