29 comments

[ 2.9 ms ] story [ 48.1 ms ] thread
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.
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. :)

Two things on the top of my head:

1) There is a classic space shooter game whose physical engine is defined solely in terms of a cellular automaton. However, to make this work the rules are not exactly Conway's rules, and cells have more than two states (multiple colors instead of black/white).

https://www.youtube.com/watch?v=UaIkQUuHoSw

2) Strategy Game: A long time ago I developed such a concept with a friend, but we never implementated that game. The idea was to have a strategic game whose units (and their strength/weaknesses) are fully described by Conway's rules, such that new "units" are not defined by the game designers, but by the players. And dicovering new interesting Game-of-life structure may give you an advantage over your competitor.

3) However, somebody else implemented a strategy game of top of Conway's game of life. It has a very different concept than what my friend and me envisioned, though, so I guess there is room for many more different games:

http://gameoflifetotalwar.com/

I've got a couple bookmarked from when I once did a search (having had similar ideas myself).

http://lifecompetes.com/ is interesting, as is http://gameoflifetotalwar.com/ (already posted by vog). The other links I saved seem to have died. None of them worked quite the way I envisaged[!] but there have been a few interesting variations on using the basic rules to make a competitive game.

[!] so writing my own is still on the list of "weekend projects that might happen if hell freezes over and I find the time"!

Herbs in ADOM (adom.de, a roguelike game, a bit like nethack) grow with Conway's Game of Life rules, so you want to pick herbs so as to maximize herb growth next time they grow.
There's a similar growth mechanism (fungus?) in Populous 2.
I had a game of life based game on an old win95 machine.

I cant remember it exactly but there was a grid and 2 teams with 2 different cell colors. Every turn the game of life rules were applied once to "advance" in time, and in every turn you can add a square of your team and remove a square from the other team

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.
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

I think the title should be changed to "in GLSL", rather than "in WebGL"
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.
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
Great discussion why User-Agent sniffing is bad is on the front page right now...
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...
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.

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.

I'd call it frustration :)
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]