Coding Challenge #85: The Game of Life

Subscribers:
1,750,000
Published on ● Video Link: https://www.youtube.com/watch?v=FWSR_7kZuYg



Duration: 38:20
637,602 views
11,333


In this coding challenge, I attempt to code Conwayโ€™s Game of Life cellular automata simulation in JavaScript using the p5.js library. Code: https://thecodingtrain.com/challenges/85-the-game-of-life

๐Ÿ•น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/UtSMCB1zv

๐ŸŽฅ Next video: https://youtu.be/H81Tdrmz2LA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
๐Ÿ—„ Conway's Game of Life on Wikipedia: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
๐Ÿ““ Mathematical Games: http://www.ibiblio.org/lifepatterns/october1970.html

Videos:
๐Ÿš‚ My Video on The Game of Life: https://www.youtube.com/watch?v=tENSCEO-LEc
๐Ÿš‚ 2D Arrays in JavaScript: https://www.youtube.com/watch?v=OTNpiLUSiB4
๐Ÿš‚ The Modulo Operator with Golan Levin: https://www.youtube.com/watch?v=r5Iy3v1co0A
๐Ÿ”ด Coding Train Live 108: https://youtu.be/U8S1qDjIE2Yt=8518s

Related Coding Challenges:
๐Ÿš‚ #89 Langton's Ant: https://youtu.be/G1EgjgMo48U
๐Ÿš‚ #107 Sandpiles: https://youtu.be/diGjw5tghYU
๐Ÿš‚ #102 2D Water Ripple: https://youtu.be/BZUdGqeOD0w

Timestamps:
0:00 Introduction
2:00 Generations
7:18 make2DArray()
17:20 Compute Next Generation
21:19 countNeighbors()
23:14 Deal with Edges
25:44 Implement Rules
30:00 Implement Wraparound with Modulus
36:13 Variations

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

๐Ÿš‚ Website: http://thecodingtrain.com/
๐Ÿ‘พ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
๐Ÿšฉ Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
๐Ÿ’ก GitHub: https://github.com/CodingTrain
๐Ÿ’ฌ Discord: https://discord.gg/hPuGy2g
๐Ÿ’– Membership: http://youtube.com/thecodingtrain/join
๐Ÿ›’ Store: https://standard.tv/codingtrain
๐Ÿ–‹๏ธ Twitter: https://twitter.com/thecodingtrain
๐Ÿ“ธ Instagram: https://www.instagram.com/the.coding.train/

๐ŸŽฅ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

๐Ÿ”— p5.js: https://p5js.org
๐Ÿ”— p5.js Web Editor: https://editor.p5js.org/
๐Ÿ”— Processing: https://processing.org

๐Ÿ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#gameoflife #cellularautomata #modulus #javascript #p5js







Tags:
JavaScript (Programming Language)
live
programming
daniel shiffman
creative coding
coding challenge
tutorial
coding
challenges
coding train
the coding train
live stream
itp nyu
this.dot
game of life
conway game of life
game of life js
game of life javascript
object oriented programming
the game of life
cellular automata
cellular automaton
john conway
simulation
2d array
modulo
modulus