Coding Challenge #85: The Game of Life

Subscribers:
1,740,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