Navigate Select ESC Close

Python Simulation Tutorial - Conway's Game of Life

2023-10-01 Education
48.5k
1.3k
55
Tech With Tim
Tech With Tim
2.0m subscribers

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

Today, I am going to show you how to create the famous simulation known as "Conway's Game of Life", a cellular automation devised by John Horton Conway in 1970. We are going to build it in Python using Pygame in less than 1 hour! Get started with Taipy's open-source library and build entire applications quickly and easily with python: https://github.com/Avaiga/taipy 🎓 *Premium Courses* 🏢 _CourseCareers_ https://coursecareers.com/a/techwithtim 🔗 _BlockchainExpert_ https://algoexpert.io/blockchain (use code “tim”) 💻 _ProgrammingExpert_ https://programmingexpert.io/tim (use code “tim”) 🎓 *Free Courses* 📚 _Introduction To Software Development_ https://coursecareers.com/a/techwithtim 🎞 *Video Resources* Code Download: https://github.com/techwithtim/Conways-Game-Of-Life Install Pygame (Mac): https://www.youtube.com/watch?v=E-WhAS6qzsU Install Pygame (Windows): https://www.youtube.com/watch?v=AdUZArA-kZw&t=11s ⏳ *Timestamps* 00:00 | Overview 01:34 | Taipy 02:37 | Rules Visuals 03:34 | Pygame Install 04:10 | Constants and Setup 06:50 | Writing the Main Loop 09:36 | Drawing The Grid 19:26 | Adding Cells 22:12 | Handling Other Keypresses 26:59 | Updating The Grid 🔗 *Socials* 📸 _Instagram_ https://www.instagram.com/tech_with_tim 🐦 _Twitter_ https://twitter.com/TechWithTimm 💬 _Discord_ https://discord.gg/twt 🤝 _LinkedIn_ https://www.linkedin.com/in/tim-ruscica-82631b179/ 🌐 _Website_ https://techwithtim.net 💾 _GitHub_ https://github.com/techwithtim *Support* 👕 _Merch_ https://teespring.com/stores/tech-with-tim-merch-shop 💵 _Donations_ https://www.paypal.com/donate?hosted_button_id=CU9FV329ADNT8 🙏 _Patreon_ https://www.patreon.com/techwithtim 🔖 *Tags* -Tech with Tim - Python Programing - Simulation Tutorial *Hashtags* #python #techwithtim #pythontutorial

Top Comments (10)

@bobhermann7510 2026-05-07

Thank you so much for all the hard work putting this together. I was researching how to code The Game of Life in Python, but most examples I ran across used simple text characters. I am a Python beginner, but I knew about Pygame so I started searching for examples using Pygame components, and you delivered big time!

0
@programm_mister9692 2023-12-29

Thanks bro, otherwise I ran into a bunch of bugs when developing the game "life" on my game engine.

1
@bp-ob8ic 2023-10-02

Conway's Game of Life has always fascinated me. Gonna work through this in the morning. Thanks for this tutorial. I was able to follow the logic, and it mostly matched the pseudo code I had blocked out. Now I just have to learn more pygame.

3
@esrx7a 2023-10-01

What a concept! I had been breaking my head to understand the concept & this happens finally. Thank you Tim

7
@ArjitYadav-x7x 2025-10-09

"Delete you." has to be the diabolical statements of all time.

2
@void_presence 2024-01-03

fantastic, just the thing i was looking for: python implementation of Conway's Life with clickable nodes

1
@rcflyer40plus1 2024-11-23

Worked like a charm. Enough room to create a Gosper Glider Gun and watch it spawn walkers. My first project on Raspberry PI - thank you!!!

0
@BsktImp 2023-10-01

Didn't realise set() data structure and methods were so useful.

0
@StreakyFly 2023-10-02

I was waiting for you to make Conway's game of life and finally, here it is. Great video! :D

1
@LifelongLogs 2024-08-24

thank you so much tim, this will help me a lot to develop my school project :)

0

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan • All features unlocked

App screenshot