Improving Conway's Game of Life Example
Most appropriate sections of the p5.js website?
Examples
What is your operating system?
Mac OS
Web browser and version
Safari 16.0
Actual Behavior
Noting that there is no Existing Feature Enhancement option for contributing here this may not be the correct issue to raise. In which case please let me know, and I will submit the issue more appropriately. I am new to contributing to open-source projects.
Currently, in the game of life example, the states transition too quickly. This causes an unpleasant flickering effect to occur, which could upset photosensitive individuals.
Expected Behavior
In the original example from the Processing website the game of life has an interval between state updates:
int interval = 100;
int lastRecordedTime = 0;
...
void draw() {
//Draw grid
...
// Iterate if timer ticks
if (millis()-lastRecordedTime>interval) {
if (!pause) {
iteration();
lastRecordedTime = millis();
}
}
This makes the example considerably more pleasant to watch.
Steps to reproduce
Just simply view the example on the website.
Would you like to work on the issue?
Yes
You can go ahead with a fix. Thanks.
No worries, I'll get cracking on it.