UAL CCI: Introduction to Creative Computing Intensive 2022: 🦜: Workshop 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 40 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.
Let's take a look at the source code of the flocking example from the p5.js examples page. What ideas from earlier in the week can you see in this example? What happens when you change elements of the simulation? We have 40 minutes on this one.
Finally, https://p5js.org/examples/simulate-game-of-life.html - 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?
Thanks! Time for a short break!
Back to slide index.