Raymond-exe / Conway.py

[WIP] An interactive simulation of Conway's Game of Life, written in Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conway.py

A Python simulation of Conway's Game of Life

Notice: This repository is a work-in-progress. Several features are still missing and opimizations have yet to be done. Any pre-releases published are not representative of the final project.


Basics of Conway's Game of Life

Conway's Game of Life is a cell-based simulation of "life" which consists of 4 basic rules:

  • Any living cell with 2 or 3 living neighbors stays alive.
  • A living cell without exactly 2 or 3 neighbors dies the next generation.
  • Any dead cell with exactly 3 living neighbors is revived.
*More information about Conway's Game of Life can be found on Wikipedia

Controls

Input Action
Left-click Toggle cell (kill/create)
Right-click Drag to move viewport
Scrollwheel Zoom in/out
Spacebar Skip to next generation
R Reset simulation

TODO

Features:

  • Accurate simulation rules.
  • X/Y Axis.
  • Movable viewport.
  • Add "ghost" effect option for prior generations.
  • Add UI buttons below simulation canvas for pause/play.
  • Add UI buttons for speed control.
  • Customizable color themes.
  • Screen-space rendering
  • "Old" screen effects + viewport warp?

Bugs:

  • Zoom scales viewport relative to world, not relative to viewport.
  • Optimize active_cells set management
  • Optimize rendering function for better performance

About

[WIP] An interactive simulation of Conway's Game of Life, written in Python.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%