This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Vilsol's profile picture

Conway's Game Of Life

Started by Vilsol, 16 August 2013 - 06:31 AM
Vilsol #1
Posted 16 August 2013 - 08:31 AM
Conway's Game Of Life



pastebin get gjG6MXHq gol

Pastebin: Here

Conway's game of life is like a simulation of life that is made up of cells and four simple rules:
1. If a cell has less than 2 neighbors it dies.
2. If a cell has 2 or 3 neighbors it lives.
3. If a cell has more than 3 neighbors it dies.
4. If a cell has exactly 3 neighbors it is born.

This is a computer program that computes these rules and displays them.

Features:
Colored and non-colored mode (switched with spacebar)
Play / Pause (with enter)
Editing while it is computing.

Screenshots:

Introduction:
Spoiler

Colored Mode
Spoiler

Non-Colored mode
Spoiler
AlktatStudios #2
Posted 08 September 2013 - 05:12 PM
Can you make a dropbox, pastebin, or mediafire download for this?
Vilsol #3
Posted 08 September 2013 - 05:47 PM
Well there is a pastebin command, but now I added a link.
AlktatStudios #4
Posted 28 September 2013 - 10:37 AM
Okay, thanks.
Zambonie #5
Posted 01 October 2013 - 08:39 PM
Seems cool. Heh, I made a small spreading 'cell virus' .
Dragon53535 #6
Posted 05 October 2013 - 11:33 PM
Hehe, by placing too many, it breaks it, the error i got was gol:111: index expected, got nil

Edit: Okay due to trial and error, basically the entire thing is if I hold down and drag a lot.
Vilsol #7
Posted 06 October 2013 - 05:54 AM
Hehe, by placing too many, it breaks it, the error i got was gol:111: index expected, got nil

Edit: Okay due to trial and error, basically the entire thing is if I hold down and drag a lot.

I am unable to reproduce your error. Have you edited the code?
svdragster #8
Posted 06 October 2013 - 02:38 PM
Really nice! I like running it in the background and come back later ^^
Dragon53535 #9
Posted 06 October 2013 - 03:32 PM
Hehe, by placing too many, it breaks it, the error i got was gol:111: index expected, got nil

Edit: Okay due to trial and error, basically the entire thing is if I hold down and drag a lot.

I am unable to reproduce your error. Have you edited the code?
Turns out it was just the CC emulator i was running, i guess i overloaded it lol, but otherthan that it works fine :P/>
M4sh3dP0t4t03 #10
Posted 09 October 2013 - 10:53 AM
Nice done. I'm currently working on my own version of this, but it's going to be different.
Csstform #11
Posted 15 October 2013 - 02:38 PM
I'll test it out when I get a chance - looks cool!
awsmazinggenius #12
Posted 17 October 2013 - 06:53 PM
This game has an interesting concept. Thanks.
Forgotten_Boy #13
Posted 22 October 2013 - 08:24 PM
Sweet, you know a computing platform is the real deal when it includes Conway's Life.

My only suggestion: make the default pattern be that collection of seven gliders that become a glider gun…
ATMunn #14
Posted 22 October 2013 - 09:11 PM
Cool game! Q: How long exactly does it take for the next generation to come?
Forgotten_Boy #15
Posted 24 October 2013 - 01:36 AM
I took it upon myself to add the glider synthesis of Gosper's Glider Gun myself. Here's an updated version of Vilsol's program. The pastebin ID is eZwifVAF.

Now if you run the program with a big monitor attached (at least 47 pixels wide) it will put 8 gliders on the screen that combine to form Gosper's Glider Gun, the first known "gun" in Conway's Life. Best viewed in black and white. As I recall this pattern was discovered in the 1980's by someone at MIT, but I can never find the right info about it when I look for it. In any case it is a truly fantastic pattern, it's just a shame that Vilsol's program doesn't feature a "torroidal" world so that the pattern could destroy itself. :D/>

The actual code to define the gliders is RLE Life format. It wouldn't take much work to generalize what I did to load Life pattern files.
Vilsol #16
Posted 24 October 2013 - 08:48 AM
I took it upon myself to add the glider synthesis of Gosper's Glider Gun myself. Here's an updated version of Vilsol's program. The pastebin ID is eZwifVAF.

Now if you run the program with a big monitor attached (at least 47 pixels wide) it will put 8 gliders on the screen that combine to form Gosper's Glider Gun, the first known "gun" in Conway's Life. Best viewed in black and white. As I recall this pattern was discovered in the 1980's by someone at MIT, but I can never find the right info about it when I look for it. In any case it is a truly fantastic pattern, it's just a shame that Vilsol's program doesn't feature a "torroidal" world so that the pattern could destroy itself. :D/>

The actual code to define the gliders is RLE Life format. It wouldn't take much work to generalize what I did to load Life pattern files.

I will update the program this weekend, so you can switch between torodial or walls. As well as I will add a reset and example buttons.