Introduction to Creative Computing 2026/2027: 🦜: Individual Work 9: Flocking and Conway's Game of Life
Back to slide index.
This morning we are going to complete two exercises, Flocking (or Boids) and Conway's Game of Life.
We'll have 30 minutes for each exercise. In contrast to earlier days we are going to look at existing code and understand it, before seeing what happens when we change it. I really want you to spend time today commenting every line of code.
A reminder from yesterday, the day before, the day before that and the day before that: make these exercises on the
online p5.js editor at https://editor.p5js.org - easier for sharing with others and a nice way of building up a portfolio of p5.js sketches.
Finally,
Conway's Game of Life implemented in p5.js. What is this new Array thing? How would you find out more about it? Perhaps we could change the sketch to have different colours? Or only change when someone clicks? Or to allow people to draw patterns?
Have you started making your portfolio of sketches and your reflective statement? See
the unit wiki for links to places to help you make your own if you get stuck. I'd REALLY recommend adding to your GitHub page every week, and your reflective statement. An hour a week in these individual sessions will make a BIG difference and you won't be in a rush at the end of the unit. Have you tried the Share option in the File menu of editor.p5js.org? It's a great way of getting URLs to add to your portfolio of sketches.