Python Simulation Tutorial - Conway's Game of Life

  Рет қаралды 37,371

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 49
@DJ-ct6so
@DJ-ct6so Ай бұрын
Good work Tim, as always. Many thanks for this tutorial, I haven't used pygame before, hence I learned a significant amount. Back in the 1970s I encountered John Conway's game of 'Life' in an edition of Scientific American, and later wrote a similar simulator using QBASIC. I further developed it into a 2-4 player game where each player could add new live cells, in an attempt to grow additional cells of their chosen color, keep their existing cells alive, and/or overpopulate and thus destroy their opponent's cells. After each player had a turn, Conway's rules were applied. There were some adjacency rules regarding where a player was permitted to add new cells, which also meant that if a player had no more live cells, they were eliminated. Last remaining player wins. Compared to QBASIC, Python's native constructs and concepts (lists, sets, etc) keep the required coding, for a project of this type, more simple, tidy, and readable.
@rcflyer40plus1
@rcflyer40plus1 26 күн бұрын
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!!!
@bp-ob8ic
@bp-ob8ic Жыл бұрын
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.
@StreakyFly
@StreakyFly Жыл бұрын
I was waiting for you to make Conway's game of life and finally, here it is. Great video! :D
@esrx7a
@esrx7a Жыл бұрын
What a concept! I had been breaking my head to understand the concept & this happens finally. Thank you Tim
@void_presence
@void_presence 11 ай бұрын
fantastic, just the thing i was looking for: python implementation of Conway's Life with clickable nodes
@NicolasFleury-ww5ut
@NicolasFleury-ww5ut 7 ай бұрын
It is working perfectly well! Thank you Tim. However, please note that on line 21 of the code, you should invert GRID_WIDTH and GRID_HEIGHT for correct random position generation, especially for different screen width and height.
@timeWaster76
@timeWaster76 9 ай бұрын
best coder vid's on youtube
@bakerboyplayz5254
@bakerboyplayz5254 3 ай бұрын
thank you so much tim, this will help me a lot to develop my school project :)
@vizionthing
@vizionthing Жыл бұрын
Outstanding Tim, loved this one.
@TechWithTim
@TechWithTim Жыл бұрын
Thank you!
@westudy9180
@westudy9180 Жыл бұрын
i really like these kind of video please make more of these video i am looking forward for that thank you once again....👏🏻🙌🏻👏🏻
@eNit0x
@eNit0x 7 ай бұрын
thank you for the tutorial works perfectly fine !
@BsktImp
@BsktImp Жыл бұрын
Didn't realise set() data structure and methods were so useful.
@17crescent
@17crescent Жыл бұрын
Great video. Slight correction as 39+1 can never be > 40 in your example grid. Plus added a wrap-around: def get_neighbors(pos): x, y = pos neighbors = [] for dx in [-1, 0, 1]: if x + dx < 0: x += GRID_WIDTH elif x + dx == GRID_WIDTH: x -= GRID_WIDTH for dy in [-1, 0, 1]: if y + dy < 0: y += GRID_HEIGHT elif y + dy == GRID_HEIGHT: y -= GRID_HEIGHT if dx == 0 and dy == 0: continue neighbors.append((x + dx, y + dy)) return neighbors
@programm_mister9692
@programm_mister9692 11 ай бұрын
Thanks bro, otherwise I ran into a bunch of bugs when developing the game "life" on my game engine.
@plinketharry7469
@plinketharry7469 Жыл бұрын
this was great, cheers
@ashirwadsingh6926
@ashirwadsingh6926 Жыл бұрын
amazing video keep up the good work
@jerryedept2022
@jerryedept2022 10 ай бұрын
Does anyone please have a version of this code with ezgraphics?
@elenasavchenkova2601
@elenasavchenkova2601 4 ай бұрын
Hi. What PyCharm theme are you using here?
@paulthomas1052
@paulthomas1052 Жыл бұрын
Very interesting - great code as usual. Thanks !
@TechWithTim
@TechWithTim Жыл бұрын
Glad you liked it!
@gamerfisch5117
@gamerfisch5117 Жыл бұрын
great video 👍
@Car2hell975
@Car2hell975 11 ай бұрын
How Can i make simulation like Project jdm and math Floyd can you make a video or tell me where to start
@richardsifeanyi6766
@richardsifeanyi6766 Жыл бұрын
Thanks Tim
@TechWithTim
@TechWithTim Жыл бұрын
No problem :)
@miichanshi
@miichanshi Жыл бұрын
can you make a tutorial on reflex or pynecone
@Digital_Anime_Creator0709
@Digital_Anime_Creator0709 Жыл бұрын
heloo sir can u create a digitmatch that can predict the last number randomly for example entry spot 12345 the last is 5 then the last exit result lexit spot is 5 also can u make it this sir?
@pathapativarshitha1780
@pathapativarshitha1780 Жыл бұрын
Hii, really useful video... like always :)
@MrMysterious31
@MrMysterious31 Жыл бұрын
Hi tim, I want to simulate how an object of certain pounds would react on the different planets with different gravity.. kindly make a video if possible.. regards:)
@fruitStall
@fruitStall Жыл бұрын
Hey. I followed the tutorial and everything works until I try to run the simulation. I get the error "not enough values to unpack (expected 2, got 1)" at line 58 (x, y = pos in the get_neighbors function) Any idea why this happens and how to fix it?
@foqsi_
@foqsi_ Жыл бұрын
I had to recreate this in Java for school. Sucked. lol
@AndroidGamer-lz2uh
@AndroidGamer-lz2uh Жыл бұрын
same lol what school u go to?
@meim6028
@meim6028 Жыл бұрын
Hey Tim, can help help the community to create a product web app
@Pramix
@Pramix Жыл бұрын
Insaine!! how do you learn programming like this?? 🤯
@Suto_Ko
@Suto_Ko Жыл бұрын
he practice, practice, practice. Programming is a skill that improves with hands-on experience. Start with the basics, like learning a programming language, understanding concepts, and solving small coding problems. Build projects, join coding communities, and never stop learning. It takes time and effort, but it's worth it.
@jeffreyepiscopo
@jeffreyepiscopo Жыл бұрын
Why pygame instead of pygame-ce?
@Suto_Ko
@Suto_Ko Жыл бұрын
pygame-ce is a community-driven fork of pygame that aims to continue development and address some of the issues in the original pygame. While pygame-ce offers some improvements, the choice between pygame and pygame-ce ultimately depends on your specific needs and preferences. Both libraries can be used to create games and multimedia applications in Python.
@jeffreyepiscopo
@jeffreyepiscopo Жыл бұрын
@@Suto_Ko is this chat gpt
@mehtabsinghgiran6531
@mehtabsinghgiran6531 Жыл бұрын
first comment i think 😆😅
@cosmicman00
@cosmicman00 4 ай бұрын
do boid simulation
@nakulgaming2537
@nakulgaming2537 Жыл бұрын
Hello
@TechWithTim
@TechWithTim Жыл бұрын
Hey!
@nakulgaming2537
@nakulgaming2537 Жыл бұрын
I was tried your all projects of python nd it really helped me very much❤️
@no99mnecfw
@no99mnecfw Жыл бұрын
Please stop saying actually so much.
@zealotdraws3017
@zealotdraws3017 10 ай бұрын
I think ur the only one bothered
Intermediate Python Tutorial | Gravitational Slingshot Simulation
52:44
Let’s BUILD a COMPUTER in CONWAY's GAME of LIFE ⠠⠵
23:33
Alan Zucconi
Рет қаралды 1 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 118 МЛН
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,2 МЛН
Inventing Game of Life (John Conway) - Numberphile
11:05
Numberphile
Рет қаралды 1,1 МЛН
Conway's Game of Life in Processing
28:11
Miles Berry
Рет қаралды 5 М.
A COMPUTER in COMWAY's GAME of LIFE | Prime Reacts
31:08
ThePrimeTime
Рет қаралды 53 М.
Planet Simulation In Python - Tutorial
1:00:02
Tech With Tim
Рет қаралды 510 М.
I programmed some creatures. They Evolved.
56:10
davidrandallmiller
Рет қаралды 4,3 МЛН
Refactoring Conway's Game of Life | ArjanCodes Code Roast
31:49
ArjanCodes
Рет қаралды 29 М.
Computer Science in TypeScript (NO DEGREE REQUIRED) (Autocell Ep.01)
2:06:54
epic conway's game of life
6:33
Rational Animations
Рет қаралды 5 МЛН
Lenia - Artificial Life from Algorithms
13:15
Birdbrain
Рет қаралды 150 М.