
Conway's game of life computed in WebGL - stared
http://glslsandbox.com/e#207.3
======
slavik81
The concept is very simple. Conway's game of life translates to WebGL in a
fairly obvious manner. The execution, however, is brilliant. The author added
a few flourishes and made something absolutely beautiful.

------
mattegan
I had a similar idea on a flight last week and decided to implement it using
Love2d's shader support. It works with Love 0.10.0. Had some fun with it, if
you hit "h" while it's running, it spawns a grid of gliders across the entire
window, which you can then disturb by clicking on a cell. It's fun to watch
the disturbance propagate.

code - [https://github.com/mattegan/Love-
GameOfLife](https://github.com/mattegan/Love-GameOfLife)

------
KenanSulayman
Extremely cool and I love the simplicity of the implementation.

... but wtf, another example in the gallery:
[http://glslsandbox.com/e#29946.0](http://glslsandbox.com/e#29946.0) saying
»//hitler did nothing wrong //Swastika flag.«

~~~
artmageddon
Looks like 4chan has leaked out...

------
7373737373
Have a look at SmoothLife, a continuous generalisation:
[https://www.youtube.com/watch?v=KJe9H6qS82I](https://www.youtube.com/watch?v=KJe9H6qS82I)

------
deepnet
This is great. I am seeing a lot of gliders and some brief spaceships
'evolving' out of scribbling with this shader.

For raw power, the hashlife algorithm, discovered by Brian 'Glider' Gosper,
uses hash trees to memoise repetitions enabling staggeringly huge runs. [q.v.
life in life video]

------
akjetma
Nice! I too made a GLSL game of life. It also uses your webcam as a secondary
input during the lifecycle: [https://akjetma.github.io/#/face-of-
life](https://akjetma.github.io/#/face-of-life)

~~~
rplnt
Great discussion why User-Agent sniffing is bad is on the front page right
now...

~~~
akjetma
what browser are you using? well aware of the mess that is browser detection.
the function i am using is horrible voodoo cargo-culted magic:
[https://github.com/akjetma/akjetma.github.io/blob/master/src...](https://github.com/akjetma/akjetma.github.io/blob/master/src-
cljs/home/support.cljs)

~~~
rplnt
I was trying it in Opera. A chromium based browser that always had WebGL as
far as I know. Even the previous version had optional WebGL (so user agent
blocking would not made sense either). So unless this code was written 5 years
ago, it's useless. And even if it was, it's obviously badly written and
useless as well.

> well aware of the mess that is browser detection

It's a mess because people use it for other things than statistics. "Use IE5+"
era apparently taught developers absolutely nothing.

~~~
akjetma
Oh you're an opera user. That explains the anger. Anyways, it's fixed now!

edit: also want to clarify that I don't blindly use the user-agent string for
browser detection and this was a bug in my app code. Nothing to do with my
browser detection function which was working properly.

~~~
rplnt
I'd call it frustration :)

------
thecatspaw
I think the title should be changed to "in GLSL", rather than "in WebGL"

~~~
nness
I think WebGL is suitable to mention. Whilst it is strictly speaking GLSL,
with a little WebGL wrapper to execture and pass parameters, it's the WebGL
part which sets the users expectation that it is a live demo and functional
in-browser. I don't think you'd have that same inference from GLSL alone.

------
tehbmar
I have seen a lot of version of Conway's GOL but this is by far my favorite. I
love the addition of tracking the mouse movement to create more organisms.

------
jheriko
make me wonder if anyone has ever made an actual game out of game-of-life?

good work. the gradually fading trails are a nice touch. clever 'abuse' of the
rgb channels being independent. :)

~~~
fastball
Not sure about Conway's Game of Life, but there is a tower defense game where
the enemy is modeled like cellular automata, which is kinda like that.

[https://knucklecracker.com/creeperworld/playcwts.php](https://knucklecracker.com/creeperworld/playcwts.php)

~~~
7373737373
There is also Survivium:
[http://www.pocketgamer.co.uk/r/iPhone/Survivium/review.asp?c...](http://www.pocketgamer.co.uk/r/iPhone/Survivium/review.asp?c=26359)

------
ivank
Also [http://xpl.github.io/expression/](http://xpl.github.io/expression/)

