# TheSwamp

## Code Red => ARX Programming => Topic started by: It's Alive! on October 20, 2018, 01:08:56 AM

Title: Game of life
Post by: It's Alive! on October 20, 2018, 01:08:56 AM

(gol '(a b c d e f g h))
a = width
b = height
d = begin row
e = begin col
f = end row
g = end col
h = 0 = don't erase, h > 0 = erase;

d,e,f,g set the initial state

(gol '(20 30 10 0 0 5 6 0))
(gol '(100 100 100 0 1 5 9 0))
(gol '(100 100 100 0 1 5 9 1))

edit: new version, disabled undo recording
edit 2: attached source
edit 3: attached new source, draws center screen
Title: Re: Game of life
Post by: It's Alive! on October 20, 2018, 01:13:10 AM
pulsar ? (gol '(50 70 100 0 0 5 6 0))
Title: Re: Game of life
Post by: MickD on October 20, 2018, 01:13:37 AM
must....resist......shiny......object.....
:D

Will have a look as time permits Daniel, looks interesting, thanks.
Title: Re: Game of life
Post by: It's Alive! on October 20, 2018, 01:23:44 AM
a rocket  (gol '(100 100 100 0 1 5 9 0))
Title: Re: Game of life
Post by: It's Alive! on October 20, 2018, 01:23:56 AM
must....resist......shiny......object.....
:D

Will have a look as time permits Daniel, looks interesting, thanks.

lol!
Title: Re: Game of life
Post by: It's Alive! on October 20, 2018, 03:00:11 AM
these are pretty awesome
(gol '(100 100 1000 0 1 5 19 0))
(gol '(100 100 500 1 3 9 23 1))
(gol '(100 100 500 0 1 49 52 1))
(gol '(100 100 1750 0 3 49 53 1))// best yet
goes for a while before turning into oscillators  :laugh:
Title: Re: Game of life
Post by: It's Alive! on October 20, 2018, 03:38:05 AM
this one lives 1700 generations  :roll:
(gol '(100 100 1750 0 3 49 53 1))
Title: Re: Game of life
Post by: MickD on October 20, 2018, 03:50:07 AM
this one lives 1700 generations  :roll:
(gol '(100 100 1750 0 3 49 53 1))

cool!

do you have any 'sleep' time in there to keep the animation watchable, I'd imagine you'd need a bit even given the latency of the dwg database interactions etc?
Title: Re: Game of life
Post by: It's Alive! on October 20, 2018, 03:54:50 AM
this one lives 1700 generations  :roll:
(gol '(100 100 1750 0 3 49 53 1))

cool!

do you have any 'sleep' time in there to keep the animation watchable, I'd imagine you'd need a bit even given the latency of the dwg database interactions etc?

yeah, like 50ms each generation, otherwise the end of the world comes too fast
Title: Re: Game of life
Post by: It's Alive! on October 20, 2018, 06:53:42 AM
well enough fun for today, attached the source.
I need to add fortune and trek, make it more useful  :yes:
Title: Re: Game of life
Post by: It's Alive! on December 27, 2021, 07:40:49 AM