<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Game of Life - new attempt]]></title><description><![CDATA[<p>i solved the problems that i had with the last version and also implemented an algorithm that is more efficient (it calculates only the cells that have changed during the last iteration). i am glad about ideas how to further improve it (but it is also fine how it works now). hashlife? <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /><br />
edit: i put a second version with the name gol_v039wholegrid.pd into the zip file, which scans the whole grid every iteration instead of creating a list of the changed cells. it is faster if a lot is happening, but slower if less is happening (compared to the list version and only with large grids).<br />
<a href="/uploads/files/1607820065262-gol_v039.zip">gol_v039.zip</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 16:26:26 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/13181.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 11 Dec 2020 15:58:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Game of Life - new attempt on Sun, 13 Dec 2020 00:41:10 GMT]]></title><description><![CDATA[<p>i solved the problems that i had with the last version and also implemented an algorithm that is more efficient (it calculates only the cells that have changed during the last iteration). i am glad about ideas how to further improve it (but it is also fine how it works now). hashlife? <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /><br />
edit: i put a second version with the name gol_v039wholegrid.pd into the zip file, which scans the whole grid every iteration instead of creating a list of the changed cells. it is faster if a lot is happening, but slower if less is happening (compared to the list version and only with large grids).<br />
<a href="/uploads/files/1607820065262-gol_v039.zip">gol_v039.zip</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Sun, 13 Dec 2020 00:41:10 GMT</pubDate></item><item><title><![CDATA[Reply to Game of Life - new attempt on Fri, 11 Dec 2020 21:06:14 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jona">@Jona</a> Nice work. Another interesting Cellular Automata is Wireworld. It is a 2D Turing complete Cellular Automata where you can simulate digital logic circuits. So you can build CPU's using only a few rules of Cellular Automata. Golly is a very nice tool for Cellular Automata research.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/2</guid><dc:creator><![CDATA[Boran Robert]]></dc:creator><pubDate>Fri, 11 Dec 2020 21:06:14 GMT</pubDate></item><item><title><![CDATA[Reply to Game of Life - new attempt on Fri, 11 Dec 2020 23:36:54 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/boran-robert">@Boran-Robert</a> thanks. i will take a look into that.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/3</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Fri, 11 Dec 2020 23:36:54 GMT</pubDate></item><item><title><![CDATA[Reply to Game of Life - new attempt on Wed, 16 Dec 2020 01:41:06 GMT]]></title><description><![CDATA[<p>i tried to improve the patch again (still no hashlife - not so easy for me to understand). reading lua performance tips was really helpful: <a href="https://www.lua.org/gems/sample.pdf" rel="nofollow">https://www.lua.org/gems/sample.pdf</a><br />
<a href="/uploads/files/1608082865261-gol_v041.zip">gol_v041.zip</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/4</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Wed, 16 Dec 2020 01:41:06 GMT</pubDate></item><item><title><![CDATA[Reply to Game of Life - new attempt on Fri, 18 Dec 2020 23:29:18 GMT]]></title><description><![CDATA[<p>i would not say this is the last update, but from now on i will upload the changes to my github page. the main change is a new system for saving patterns. again there is a basic version and a version with glsl effects...<br />
<a href="https://github.com/Jonathhhan/gameoflife" rel="nofollow">https://github.com/Jonathhhan/gameoflife</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/5</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Fri, 18 Dec 2020 23:29:18 GMT</pubDate></item><item><title><![CDATA[Reply to Game of Life - new attempt on Fri, 25 Dec 2020 17:00:16 GMT]]></title><description><![CDATA[<p>here is a completely different attempt: the game of life runs on a glsl shader.<br />
i played with that before, but i think know i understood how to customize the shader and also change the rules. it is surprisingly fast, i cannot imagine that the hashlife algorithm can be faster. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /><br />
<a href="https://nullprogram.com/blog/2014/06/10/" rel="nofollow">https://nullprogram.com/blog/2014/06/10/</a> this blog was really helpful...<br />
a few drawbacks are that the grid is not borderless anymore (not sure how to change that in the shader),<br />
and that it is only possible to save/copy/paste patterns that are created with mouse clicks...<br />
and it seems difficult to grab the data from the shader for sequencing tones for example...<br />
here is the patch: <a href="/uploads/files/1608844073565-gol_shader_v001.zip">gol_shader_v001.zip</a><br />
<a href="https://github.com/Jonathhhan/PDGameofLife-shaderVersion-" rel="nofollow">https://github.com/Jonathhhan/PDGameofLife-shaderVersion-</a></p>
<p>this is the fragment shader:</p>
<pre><code>uniform sampler2D Tex0;
uniform vec2 resolution;
uniform int lCell_1;
uniform int lCell_2;
uniform int lCell_3;
uniform int lCell_4;
uniform int lCell_5;
uniform int lCell_6;
uniform int lCell_7;
uniform int lCell_8;
uniform int dCell_1;
uniform int dCell_2;
uniform int dCell_3;
uniform int dCell_4;
uniform int dCell_5;
uniform int dCell_6;
uniform int dCell_7;
uniform int dCell_8;

int get(int x, int y) {
    return int(texture2D(Tex0, (gl_FragCoord.xy + vec2(x, y)) / resolution).r);
}

void main() {
    int sum = get(-1, -1) +
              get(-1,  0) +
              get(-1,  1) +
              get( 0, -1) +
              get( 0,  1) +
              get( 1, -1) +
              get( 1,  0) +
              get( 1,  1);
    int state = get(0, 0);
    if (sum == lCell_1 &amp;&amp; state == 0 ||
        sum == lCell_2 &amp;&amp; state == 0 ||
        sum == lCell_3 &amp;&amp; state == 0 ||
        sum == lCell_4 &amp;&amp; state == 0 ||
        sum == lCell_5 &amp;&amp; state == 0 ||
        sum == lCell_6 &amp;&amp; state == 0 ||
        sum == lCell_7 &amp;&amp; state == 0 || 
        sum == lCell_8 &amp;&amp; state == 0) { 
        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);   
    } else if (sum == dCell_1 &amp;&amp; state == 1 || 
               sum == dCell_2 &amp;&amp; state == 1 || 
               sum == dCell_3 &amp;&amp; state == 1 || 
               sum == dCell_4 &amp;&amp; state == 1 || 
               sum == dCell_5 &amp;&amp; state == 1 || 
               sum == dCell_6 &amp;&amp; state == 1 || 
               sum == dCell_7 &amp;&amp; state == 1 || 
               sum == dCell_8 &amp;&amp; state == 1 ) {       
        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
    } else {
        gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
    }
}
</code></pre>
<p>also useful as a visual noise generator <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/6</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Fri, 25 Dec 2020 17:00:16 GMT</pubDate></item><item><title><![CDATA[Reply to Game of Life - new attempt on Sun, 27 Dec 2020 03:53:12 GMT]]></title><description><![CDATA[<p>i think i got rid of the drawbacks.<br />
i just needed to add one line of code to make it an endless grid (took a while to find out about that...) <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<pre><code>a.fboCells:getTexture():setTextureWrap(GL_REPEAT, GL_REPEAT);
</code></pre>
<p><a href="/uploads/files/1609038954093-gol_shader_v003.zip">gol_shader_v003.zip</a></p>
<p>next step would be something like this (which is made with visions of chaos: <a href="https://softology.com.au/voc.htm" rel="nofollow">https://softology.com.au/voc.htm</a>):</p>
<p><div class="embed-container"><iframe src="//www.youtube.com/embed/dQJ5aEsP6Fs" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div> <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/7</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Sun, 27 Dec 2020 03:53:12 GMT</pubDate></item><item><title><![CDATA[Reply to Game of Life - new attempt on Thu, 31 Dec 2020 00:41:28 GMT]]></title><description><![CDATA[<p>I simplified the shader a bit (got rid of a lot of conditional logic), also the cell state is set to the alpha channel (so the color of the living cells does not matter):</p>
<pre><code>// fragment shader
#version 120

uniform sampler2D Tex0;
uniform vec2 resolution;
uniform float lCell_0;
uniform float lCell_1;
uniform float lCell_2;
uniform float lCell_3;
uniform float lCell_4;
uniform float lCell_5;
uniform float lCell_6;
uniform float lCell_7;
uniform float lCell_8;
uniform float dCell_0;
uniform float dCell_1;
uniform float dCell_2;
uniform float dCell_3;
uniform float dCell_4;
uniform float dCell_5;
uniform float dCell_6;
uniform float dCell_7;
uniform float dCell_8;

vec2 rule[9] = vec2[9](
    vec2(lCell_0, dCell_0),
    vec2(lCell_1, dCell_1),
    vec2(lCell_2, dCell_2),
    vec2(lCell_3, dCell_3),
    vec2(lCell_4, dCell_4),
    vec2(lCell_5, dCell_5),
    vec2(lCell_6, dCell_6),
    vec2(lCell_7, dCell_7),
    vec2(lCell_8, dCell_8)
);

int get(int x, int y) {
    return int(texture2D(Tex0, (gl_FragCoord.xy + vec2(x, y)) / resolution).a);
}

void main() {
    int sum = 
    get(-1, -1) +
    get(-1,  0) +
    get(-1,  1) +
    get( 0, -1) +
    get( 0,  1) +
    get( 1, -1) +
    get( 1,  0) +
    get( 1,  1);
    vec2 r = rule[sum];
    if (get(0, 0) == 1) {
        gl_FragColor = vec4(0., 0., 0., r.x);
    }
        else  {
            gl_FragColor = vec4(0., 0., 0., r.y);
        }
}
</code></pre>
<p>the current version is on my github page...<br />
<a href="https://github.com/Jonathhhan/PDGameofLife-shaderVersion-" rel="nofollow">https://github.com/Jonathhhan/PDGameofLife-shaderVersion-</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/8</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Thu, 31 Dec 2020 00:41:28 GMT</pubDate></item><item><title><![CDATA[Reply to Game of Life - new attempt on Sun, 03 Jan 2021 08:25:20 GMT]]></title><description><![CDATA[<p>i updated the patch again... &quot;gol_shader_v006_mask&quot; is the current version. i made a lot of changes to the render chain, because it was not working as a standalone app. it does not work, if i just bang a fbo or shader calculation (interestingly it works, if the patch runs with pure data)... my question is, how to transfer this into 3d-space with a shader (geometry shader, i think) - or a MEL script(which should be easier): <div class="embed-container"><iframe src="//www.youtube.com/embed/hqth6VDqxm8" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13181/game-of-life-new-attempt/9</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Sun, 03 Jan 2021 08:25:20 GMT</pubDate></item></channel></rss>