Game of Life in Scratch

Game of LifeA few days ago I asked for volunteers to read a book I was writing on programming, using Scratch, MIT’s visual, event-driven, programming environment.

I have not yet had any volunteers, though the flurry of online interest did get me to complete the first draft – so alpha testers still needed.

In the meantime, I have also published the version of Conway’s Game of Life the text is based around. It’s a slightly unusual implementation in that the surface of the game is, in effect, spherical in effect a torus – i.e. the edges are effectively a feature of the projection of the surface but left joins to right, top to bottom and so on.

Update: Been pointed out to me that this isn’t a sphere but a torus, and so I have updated the copy.

Advertisement

3 responses to “Game of Life in Scratch”

  1. Took a look at the code. My only comment is a complaint that the grid size (20) is hard coded everywhere. Why isn’t it stored in a variable so the grid size can be easily changed?

    1. A not unreasonable point. Though Scratch is rather inflexible so it might end up quite messy. But I shall give it a go experimentally.

  2. I also made GoF in Scratch a few years ago, this is my project: https://scratch.mit.edu/projects/82355558/. I implemented in a different way, every cell is independent object and I broadcast messages to evolve all the cells.

%d bloggers like this: