Patt Vira | p5.js Coding Tutorial | Game of Life... in 3-D! @pattvira | Uploaded March 2024 | Updated October 2024, 3 hours ago.
LET'S CONNECT
β¨ Sign up for my newsletter at pattvira.com
β¨ Instagram: instagram.com/pattvira
β¨ Twitter: twitter.com/pattvira
--
Links:
π p5.js editor: editor.p5js.org
π Game of Life 3D Code: editor.p5js.org/pattvira/sketches/EuNn7uS1S
π Introduction to Creative Coding Playlist: youtube.com/playlist?list=PL0beHPVMklwgMz4Z-mNp4_udo9mjBk7pn&si=XhvQaojd6cIrxvdn
Related videos:
π Conway's Game of Life (2D): youtu.be/lsWulRIWzdo
π Game of Life Clock (2D): youtu.be/NqysYbuwZAk
References:
π Carter Bays' 1987 paper 'Candidates for the Game of Life in Three Dimensions': complex-systems.com/abstracts/v01_i03_a01
Timestamps:
0:00 Intro
0:16 Conway's Game of Life Recap
2:10 Draw shapes in WEBGL Mode
6:13 Center cube in the middle of canvas
8:26 Create a 3D array grid to store cells' states
11:25 Create a function to sum up neighboring cells' states
14:10 Create a 3D array nextGen to store new generations of states
19:30 Use Modulo % to wrap around index values
24:02 Experiment with cells' initial states
26:11 Final aesthetics touches
LET'S CONNECT
β¨ Sign up for my newsletter at pattvira.com
β¨ Instagram: instagram.com/pattvira
β¨ Twitter: twitter.com/pattvira
--
Links:
π p5.js editor: editor.p5js.org
π Game of Life 3D Code: editor.p5js.org/pattvira/sketches/EuNn7uS1S
π Introduction to Creative Coding Playlist: youtube.com/playlist?list=PL0beHPVMklwgMz4Z-mNp4_udo9mjBk7pn&si=XhvQaojd6cIrxvdn
Related videos:
π Conway's Game of Life (2D): youtu.be/lsWulRIWzdo
π Game of Life Clock (2D): youtu.be/NqysYbuwZAk
References:
π Carter Bays' 1987 paper 'Candidates for the Game of Life in Three Dimensions': complex-systems.com/abstracts/v01_i03_a01
Timestamps:
0:00 Intro
0:16 Conway's Game of Life Recap
2:10 Draw shapes in WEBGL Mode
6:13 Center cube in the middle of canvas
8:26 Create a 3D array grid to store cells' states
11:25 Create a function to sum up neighboring cells' states
14:10 Create a 3D array nextGen to store new generations of states
19:30 Use Modulo % to wrap around index values
24:02 Experiment with cells' initial states
26:11 Final aesthetics touches