Classic Conway's Game of Life
Plans
- infinite field:
- field is split into 32x32 (or 64x64) blocks, where each line in a block is an integer number, where each bit is a cell
- the whole field is a dict where keys are block coordinates and values are blocks
See models.py for inner implementation of the game field.
- game loop
- implement gui using pyxel
- display field on the screen
- draw visible part of the field
- pan field view with the middle mouse button
- change scale with the mouse wheel
- controls (start/stop, step, clear buttons)
- field editor
- display field on the screen
- optimizations:
- use parallelization (blocks can be processed independently, so it's possible to process subsets of blocks in different threads/processes)
- rewrite parts in cython?
https://insolor.github.io/game-of-life/
Install dependencies
poetry install
Then run
poetry run app
Or
python -m game_of_life
from an activated venv.
Or
pyxel run main.py
make all