Coding the Game of Life

  Рет қаралды 21,011

The Art of Code

The Art of Code

Күн бұрын

Пікірлер: 80
@daviddawkins
@daviddawkins 3 жыл бұрын
Good to see you back
@SgtOkiDoki
@SgtOkiDoki 3 жыл бұрын
We miss you !!!
@eeerrrrzzz
@eeerrrrzzz 3 жыл бұрын
It's great to see you again.
@omg_look_behind_you
@omg_look_behind_you 3 жыл бұрын
So glad to see you posting again. I was beginning to worry you are done. You and Inigo Quilez make up the the apex of pure maths based shader design. Unfortunately, your combined exposure on KZbin is one of the most confounding mysteries of our age and further solidifies my position that not only is there no God but any existence compatible with this universe was never even an option . To fill that void, the universe has provided us with the likes of you and Inigo. Amen.
@wheercool
@wheercool 3 жыл бұрын
Wow, what a christmas gift!
@squareparticle
@squareparticle 3 жыл бұрын
I would love to see you do a tutorial on sand a water simulation using cellular automata!
@mikiex
@mikiex 3 жыл бұрын
a ripple effect would be a good one, it could be done in 2D and then expanded to 3D
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
A wave ripple sim could probably be done. Gotta look into that
@squareparticle
@squareparticle 3 жыл бұрын
@@TheArtofCodeIsCool Also, look into falling sand. It's really cool! I have seen people take images and mask parts to become sand, water, fire, smoke, acid etc... Then watch it all melt! Usually you can use a mouse to draw in solid rock to catch the liquefying sand and water. I made something like this using Javascript but Its very slow to run, therefore, I set mine at a very low resolution. However, a shader should run at 4k I assume?
@Zolbat
@Zolbat 3 жыл бұрын
I was wondering when there'd be a new video of yours just yesterday :D
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Been traveling lately so it's been hard to make stuff. I got others coming though!
@atinuchristidkfashina9643
@atinuchristidkfashina9643 2 жыл бұрын
i am still trying to implement this on a Torus. I've come across your Torus tutorial today, really helpful. I am an absolute beginner, but your videos inspired me so I chose to use Shader toys for my school project. I tell you, it's been a journey. Now trying to merge the two lessons. I love your tutorials, i think you're just brilliant. Remain ever blessed.
@aylictal
@aylictal 3 жыл бұрын
really happy to see you teaching about buffers as I dont think a lot of your previous videos did so, and a majority of the shaders on shadertoy are using them. Thanks for showing that a bit more!
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
I haven't talked about multibuffer effects before. This is the first video on the topic. But certainly won't be the last.
@alejmc
@alejmc 3 жыл бұрын
Yeah! I have always avoided those tabs when surfing ShaderToy effects (just because, on my own work I don’t mind going in with RenderTargets, temporary buffers, etc)… didn’t know it happens to be so easy to have a feedback loop directly there on shader toy.
@oraz.
@oraz. 3 жыл бұрын
It's cool how the edges grow off gliders.
@anmaral-sharif1381
@anmaral-sharif1381 3 жыл бұрын
This is awesome man, Thanks Martijn.
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Glad you like it!
@karenfu4242
@karenfu4242 2 жыл бұрын
love your shader tours! Your videos are awesome!
@Keimoj
@Keimoj 3 жыл бұрын
I need this 26:35 as audio que for work into a big red button I can hit every now and then
@HybridLizard_com
@HybridLizard_com 3 жыл бұрын
Great to see a new video! Game of life as a shader - nice. You have a really great content here. You can consider making some shaders tutorials for Godot game engine. It is small, Open-Source, lightweight and it is getting more and more popular. With v4, that will be hopefully released in a few months, it will also gain a lot of wider adoption in my opinion. I haven't seen though too many shader tutorials. You got the math / shaders knowledge, so translating it to Godot should not be a big problem as you did with Unity. The community is friendly and would for sure love to see you contributing. I am not suggesting abandoning using ShaderToy at all, just to maybe to try reaching a new, bigger audience. I believe your channel can grow massively, as it deserves. Keep up the good work whether you will decide to try it or not!
@yavuzcakr9607
@yavuzcakr9607 3 жыл бұрын
Awesome video. Not only as a shader tutorial. Also enlightening. Note: Pls fix your mic I had to follow the subtitles at some point because of the headache :D
@niyagentleman8143
@niyagentleman8143 3 жыл бұрын
wow amazing tutorial ^^!
@JPWestmas
@JPWestmas 3 жыл бұрын
This really sparks the imagination!
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Right? 🤠
@sagielevy
@sagielevy 3 жыл бұрын
Very cool that you use state for a shader this way
@lopoisaac
@lopoisaac 3 жыл бұрын
Thanks for the video!!
@crazyuniverze
@crazyuniverze 2 жыл бұрын
Amazing!
@Julian-bh7rh
@Julian-bh7rh 3 жыл бұрын
awesome video as always!:)
@gz6616
@gz6616 3 жыл бұрын
With a creepy enough music those gigantic patterns always give you gross bumps.
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Yeah there definitely some mystery there.
@peterhutt4807
@peterhutt4807 3 жыл бұрын
It's Alive !!
@hago7568
@hago7568 3 жыл бұрын
I love your videos and shader programming. It introduces a new way of thinking about it if you can't just press F9 to see wtf is going on... Could you maybe do a video on making music with shaders?
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Fragment shaders just produce pixels, no music. It would be possible to do music visualization with a shader though.
@hago7568
@hago7568 3 жыл бұрын
@@TheArtofCodeIsCool I know its a bit of stretch. Do whatever you see fit and please don't stop. Every video is an absolute mindfuck and gem! Will contribute to the padreon from January onwards to support you in any case! Merry Xmas and thank you for teaching us.
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
@@hago7568 my pleasure, thank you for watching.
@aylictal
@aylictal 3 жыл бұрын
@@TheArtofCodeIsCool Not to derail this convo but I'm a JS programmer myself getting introduced into shaders now too (as Hans Goetze just stated the f9 reference haha). Debugging tips using shaders would be nice as well. How to see values of variables when debugging? Is there a way? Any other debugging tips like how to pause execution and step through code like a lot of other languages have?
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
@@aylictal it's a good question. Nvidia might have a tool that allows you to do this (I believe it's nsight) though I've never used it. The only thing you can do is visualize intermediate values as colors, like I often do in videos to visualize UV coordinates (e.g. col.rg=uv)
@aayushparashar4143
@aayushparashar4143 3 жыл бұрын
You have to do a water sim now!!!
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
I'll put it on the next future topic list!
@coderentity2079
@coderentity2079 2 жыл бұрын
I loved the "why don't you work". What it means to me that he is coding this for real.
@DagreenApple
@DagreenApple 2 жыл бұрын
8:40 its gave me goosebumps
@atinuchristidkfashina9643
@atinuchristidkfashina9643 2 жыл бұрын
How would one turn this 2d flat grill into a globe i.e as the cell slips off one end of the grill it appears on the other side? top/bottom and both sides.
@mesrepadam
@mesrepadam 3 жыл бұрын
Someone did a clock with this? Unbelievable
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Yeah. Have a look at Alan Zurconi's great video on the topic of building a computer with this. It's pretty mind bending.
@BoyceBailey
@BoyceBailey 3 жыл бұрын
weird I recently watched a person make this in Unity and to took a lot more effor. :)
@philipashmore
@philipashmore 3 жыл бұрын
Great video! Ages ago I gave up trying to process data, then I see your video and you say "oh yeah, texelFetch()". Where's the sauce? How is the current buffer written to the screen and copied to the previous buffer?
@olegiarygin3013
@olegiarygin3013 3 жыл бұрын
The buffer is not copied from a screen. Above a code area on ShaderToy there are two tabs, the first is a shader for Buffer A and the second is a shader for a screen. For the whole video Martijn writes a shader in "Buffer A" tab that has access to its previous content as a texture until ShaderToy explicitly ends a render pass for a shader on this tab ordering a videocard to flush its pixel cache into that buffer and proceed to a shader on the next tab that will see the current content of Buffer A as a texture.
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
The buffer copy stuff is handled by shadertoy. If you wanted to implement this in a game engine you'd have to take care of that yourself.
@kuulajarkkoperse
@kuulajarkkoperse 3 жыл бұрын
can you make shader that uses game of life? :D
@gabrielalmeida5047
@gabrielalmeida5047 3 жыл бұрын
At some times the background music competes with your voice.
@realcygnus
@realcygnus 3 жыл бұрын
Supurb as always ! Btw, I was wondering how much time line 27 would cost you, initially you did say OR but typed &, I guess you couldn't hear me yelling from across the Atlantic. 😂👍
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Ahh that was you! I actually DID hear you, but this video was recorded last week ;)
@theyearofrupert
@theyearofrupert 3 жыл бұрын
Need to add a Thanos function and half the current life on a key press
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Entirely possible. How would you implement it?
@theyearofrupert
@theyearofrupert 3 жыл бұрын
@@TheArtofCodeIsCool "at random, dispassionate, fair to rich and poor alike."
@theyearofrupert
@theyearofrupert 3 жыл бұрын
@@TheArtofCodeIsCool Need to detect key press and save to a buffer. Possibly the same buffer but on another color channel(I found out shadertoy already has this). In the calculation for a survivor, check if the key is pressed and run the Thanos function. Also need a 50 percent random chance function and could have a more complicated function predict if the life was going to die anyways based on the neighboring cells(kernal comparison or "saved" to a buffer). The random function probably under/over kills without some sort of counter for the remaining number to be culled.
@theyearofrupert
@theyearofrupert 3 жыл бұрын
@@TheArtofCodeIsCool P.S. Thank you for your tutorials!
@LeutnantJoker
@LeutnantJoker 3 жыл бұрын
Cool as always :) (Just work a bit on the audio ;) ) Looking forward to the next one! :)
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Ah audio... Not my strong point for sure.
@LeutnantJoker
@LeutnantJoker 3 жыл бұрын
@@TheArtofCodeIsCool Audio is the hardest to get right :)
@michaurbanski5961
@michaurbanski5961 2 жыл бұрын
Hi, how does this work so fast? It seems it would have to do billions of operations per frame real time...
@TheArtofCodeIsCool
@TheArtofCodeIsCool 2 жыл бұрын
Yes it does. Graphics cards are insanely powerful because the process 100s of pixels in parallel.
@Jkauppa
@Jkauppa 3 жыл бұрын
any closed system is deterministic, you need inputs that are not dependent on the system to be intelligent, like a mouse/keyboard/random-noise-generator for a computer
@Jkauppa
@Jkauppa 3 жыл бұрын
add random noise in the rules
@Jkauppa
@Jkauppa 3 жыл бұрын
if you dont have dynamic input, then the life is like a complex random number generator with a repeat cycle, like its evident
@Jkauppa
@Jkauppa 3 жыл бұрын
the system cannot be outside of its memory/instruction set
@Jkauppa
@Jkauppa 3 жыл бұрын
unless it has a dynamic free entity inside itself, its equal to dead/death
@Jkauppa
@Jkauppa 3 жыл бұрын
octave in linux with nvblas gpu acceleration through cuda
@stephaneduhamel7706
@stephaneduhamel7706 3 жыл бұрын
Great video, I particularily liked the introduction. I would just like to say that there is something weird with your microphone, it's slightly unpleasent to hear sometimes.
@TheArtofCodeIsCool
@TheArtofCodeIsCool 3 жыл бұрын
Yeah I think the levels were set too high so some of the audio data clipped. Audio is obviously not my strong point 😅
@johnjohn5932
@johnjohn5932 2 жыл бұрын
Subcribing.... !!! thank you!!!
@dashxdr
@dashxdr 3 жыл бұрын
The fart at 12:44 really added to the video
@MrRoboticBrain
@MrRoboticBrain 3 жыл бұрын
You're obviously great with graphics, but you definitely have to improve your audio skills... How is it even possible to be clipping and be too quiet at the same time?!
@dasraiser
@dasraiser 2 жыл бұрын
Imagine trying to debug these!!
@prietjepruck
@prietjepruck Жыл бұрын
Realy nice. Just donated a few bucks, have a tea on me :-)
@TheArtofCodeIsCool
@TheArtofCodeIsCool Жыл бұрын
Thank you!
Live Coding and Alien Orb - Modeling & Shadows
30:31
The Art of Code
Рет қаралды 10 М.
Coding the Game of Life - Part II
32:56
The Art of Code
Рет қаралды 6 М.
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
Programming Conway's Game of Life | Coding Challenge
7:16
CodeNoodles
Рет қаралды 35 М.
A COMPUTER in COMWAY's GAME of LIFE | Prime Reacts
31:08
ThePrimeTime
Рет қаралды 53 М.
Smoothstep: The most useful function
23:56
The Art of Code
Рет қаралды 65 М.
Langton's Loops: The cellular automaton that copies itself
12:01
davbrdavbr
Рет қаралды 521 М.
I Designed My Own 16-bit CPU
15:46
AstroSam
Рет қаралды 2,1 МЛН
Voronoi Explained!
22:58
The Art of Code
Рет қаралды 103 М.
Create Life From a Simple Rule
14:37
Brainxyz
Рет қаралды 793 М.
Conway's Game of Life in Python
19:39
NeuralNine
Рет қаралды 50 М.
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН