Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidbuchanan314/pyswargol
A rather fast Game-of-Life implementation in pure Python (plus pysdl2)
https://github.com/davidbuchanan314/pyswargol
cgol game-of-life game-of-life-python multithreading pysdl2 python python3 sdl2 swar
Last synced: about 2 months ago
JSON representation
A rather fast Game-of-Life implementation in pure Python (plus pysdl2)
- Host: GitHub
- URL: https://github.com/davidbuchanan314/pyswargol
- Owner: DavidBuchanan314
- License: mit
- Created: 2023-12-01T22:32:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-04T20:47:10.000Z (12 months ago)
- Last Synced: 2024-01-05T20:23:53.808Z (12 months ago)
- Topics: cgol, game-of-life, game-of-life-python, multithreading, pysdl2, python, python3, sdl2, swar
- Language: Python
- Homepage:
- Size: 54.7 KB
- Stars: 15
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyswargol
```
$ python3 swargol.py --help
Usage: swargol.py [OPTIONS]Render Conway's Game of Life via SDL2, unreasonably quickly.
Options:
--width=INT framebuffer width (default: 1280)
--height=INT framebuffer height (default: 720)
--vsync=BOOL enable vsync (default: True)
--fullscreen enable fullscreen
--drylife=BOOL use the non-standard "drylife" algorithm (default: True)
--slow use the very slow implementation (for benchmark comparisons)
--frameskip=INT only render 1-in-n frames to the screen (default: 1)
--num-procs=INT degree of parallelism (NB: number of actual threads will be 2n+1) (default: 8)
--bench-frames=INT render a certain number of frames and then exit (default: 0)Other actions:
-h, --help Show the help
```I've written [an article](https://www.da.vidbuchanan.co.uk/blog/python-swar.html) explaining more about how and why this code works.
![image](https://github.com/DavidBuchanan314/pyswargol/assets/13520633/217eaf38-d8b6-43ef-a37a-98a229dcae31)