Page 1 of 1

Inny's Game Of Life

Posted: Thu Mar 28, 2013 10:39 pm
by Inny
I wrote a Conway's Game Of Life simulator just for my own experimentation, but then decided to turn it into an educational tool. I took it from a hundred line file to a 533 extensively commented file. If any of you guys have siblings, significant others, children, or anyone else that wants to learn some Lua and Love, then please walk through the source code with them. I'm going to put my own girlfriend through this, and I do want to take into account whatever feedback I get towards revisions. Thanks in advance for any comments.

Plus, it's Conway's Game Of Life, these are always fun to toy around with. :D

Note: I *believe* my implementation is correct. Gliders and stuff are working as expected. If I botched something, then please tell me. Also, I have the world wrap at the edges, rather than end. I like it better when spaceships wrap around and demonstrate that they're going to live forever.

Re: Inny's Game Of Life

Posted: Fri Mar 29, 2013 7:36 am
by vitaminx
Your comments in the source are super useful, I've already learned about first class funcions from it :D

Re: Inny's Game Of Life

Posted: Fri Mar 29, 2013 8:20 am
by Germanunkol
The "glider" and "toad" are nice :D

It's interesting how large populations (pressing 8 or 9) usually die off instantly...

Re: Inny's Game Of Life

Posted: Fri Mar 29, 2013 9:30 am
by xXxMoNkEyMaNxXx
You need a 'Tick once' feature!

I can't help mentioning my implementation with pixel shaders and without educational documentation, which runs ridiculously fast because it's on the GPU:
GOL2.love
https://love2d.org/forums/viewtopic.php?f=5&t=15781
(50.11 KiB) Downloaded 126 times
Yours is definitely more visually pleasing, but it feels like it's lagging after playing with mine for a while :rofl:

Re: Inny's Game Of Life

Posted: Fri Mar 29, 2013 9:56 am
by Username
Germanunkol wrote:The "glider" and "toad" are nice :D

It's interesting how large populations (pressing 8 or 9) usually die off instantly...

Do this:

Pause game.
Clear game
Draw a straight line of 10 cells.
Enjoy.

Re: Inny's Game Of Life

Posted: Fri Mar 29, 2013 1:36 pm
by Inny
vitaminx wrote:Your comments in the source are super useful, I've already learned about first class funcions from it :D
Mission accomplished then. :P I'm glad I could help.
xXxMoNkEyMaNxXx wrote:You need a 'Tick once' feature!
I'm half stunned that I didn't think to add this. Also, GLSL game of life is brilliant.
Germanunkol wrote:It's interesting how large populations (pressing 8 or 9) usually die off instantly...
You should see how overcrowded New York City's subway system is, for comparison. :D