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
- change scale with the mouse wheel
- pan field view with the middle mouse button
- controls (start/stop, step buttons)
- edit with the mouse, clear the field
- add a help screen
- 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 using poethepoet:
poe run
Or
poetry shell # activate the virtual environment
python -m game_of_life
Or
poetry shell
pyxel run main.py
Or
make run
make all