Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jelni/game-of-life
Conway's Game of Life Rust implementation using a point quadtree data structure.
https://github.com/jelni/game-of-life
conways-game-of-life game-of-life
Last synced: 11 days ago
JSON representation
Conway's Game of Life Rust implementation using a point quadtree data structure.
- Host: GitHub
- URL: https://github.com/jelni/game-of-life
- Owner: jelni
- Created: 2023-05-28T00:57:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-20T17:19:18.000Z (3 months ago)
- Last Synced: 2024-12-24T05:04:05.867Z (18 days ago)
- Topics: conways-game-of-life, game-of-life
- Language: Rust
- Homepage: https://game-of-life.jel.gay/
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Conway's Game of Life
I haven't programmed a Game of Life before, so here's my attempt:
[Conway's Game of Life](https://wikipedia.org/wiki/Conway%27s_Game_of_Life) Rust
implementation using a
[point quadtree](https://wikipedia.org/wiki/Quadtree#Point_quadtree) data
structure.The use of a quadtree allows the board to be infinite.
![Screenshot of the program showing a Gosper's glider gun](https://github.com/jelni/game-of-life/assets/25802745/b2b9f12f-f097-4e7e-a405-3e230640680c)
## Interactions
- Right mouse button – add cells
- Left mouse button – remove cells
- Middle mouse button – pan
- Mouse wheel – zoom in and out
- Space – pause or resume
- N – go forward one step
- Ctrl+Z – go back to the last resume state## Thoughts on the [`macroquad`](https://github.com/not-fl3/macroquad) crate
This crate is easy to use and renders the screen using a GPU shader, but I don't
like how there's an implicit global window instance and that every value (window
size, mouse position, scroll distance) is a float. It also doesn't support arrow
keys. I didn't find a crate I liked more.