{"id":70,"date":"2009-09-06T22:29:40","date_gmt":"2009-09-06T23:29:40","guid":{"rendered":"http:\/\/www.tamats.com\/blog\/?p=70"},"modified":"2009-09-06T22:29:40","modified_gmt":"2009-09-06T23:29:40","slug":"hackpact-day-5-conway-in-a-cube","status":"publish","type":"post","link":"https:\/\/www.tamats.com\/blog\/?p=70","title":{"rendered":"Hackpact Day 5: Conway in a cube"},"content":{"rendered":"<p>Today I was a little bit short of ideas, and having the latest Alone In The Dark game didn&#8217;t helped.<\/p>\n<p>So I decided to give a better look to the conway shader I coded yesterday, so instead of using it as a PostFX I used it as a texture for the cube. It was easy, I only had to add the texture coordinates to the cube and activate the result texture from the conway code when rendering the cube.<\/p>\n<p>I can&#8217;t say the results are very good but for those who love the cellular automatas it is fun to see.<\/p>\n<p>I tryed to improved a little bit the conway shader but I ran out of ideas. I end up putting a different world in every color channel, so what you see is three boards at the same time (red, green and blue). I start the world using a texture which is in grayscale so more or less all channels start being almost the same.<\/p>\n<p>All the faces in the cube use the same texture, and when I coded the conway I forced the textures to repeat on the edges, so it gives the look and feel that every face behaves diferent, but they are all the same.<\/p>\n<p>I also tryed to render the cube several times with diferent sizes to give the feel that the pixels have volume, but it didnt worked. So at the end I just took advantage of the posibilities of the graphics card and use a texture big enough to have a huge conway world, and it looks fun when you see so many cells in action.<\/p>\n<p>Now screenshots and source code:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-73\" title=\"hackpact_day5_screenshot1\" src=\"http:\/\/www.tamats.com\/blog\/wp-content\/uploads\/2009\/09\/hackpact_day5_screenshot1.jpg\" alt=\"hackpact_day5_screenshot1\" width=\"550\" height=\"415\" srcset=\"https:\/\/www.tamats.com\/blog\/wp-content\/uploads\/2009\/09\/hackpact_day5_screenshot1.jpg 550w, https:\/\/www.tamats.com\/blog\/wp-content\/uploads\/2009\/09\/hackpact_day5_screenshot1-300x226.jpg 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-72\" title=\"hackpact_day5_screenshot2\" src=\"http:\/\/www.tamats.com\/blog\/wp-content\/uploads\/2009\/09\/hackpact_day5_screenshot2.jpg\" alt=\"hackpact_day5_screenshot2\" width=\"550\" height=\"415\" srcset=\"https:\/\/www.tamats.com\/blog\/wp-content\/uploads\/2009\/09\/hackpact_day5_screenshot2.jpg 550w, https:\/\/www.tamats.com\/blog\/wp-content\/uploads\/2009\/09\/hackpact_day5_screenshot2-300x226.jpg 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/p>\n<p>Here you can download the source code: <a href=\"http:\/\/www.tamats.com\/blog\/wp-content\/uploads\/2009\/09\/hackpact-day-5.zip\">hackpact day 5<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I was a little bit short of ideas, and having the latest Alone In The Dark game didn&#8217;t helped. So I decided to give a better look to the conway shader I coded yesterday, so instead of using it as a PostFX I used it as a texture for the cube. It was easy, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[11,5,34,13],"class_list":["post-70","post","type-post","status-publish","format-standard","hentry","category-devlog","tag-conway","tag-opengl","tag-python","tag-shader"],"_links":{"self":[{"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=70"}],"version-history":[{"count":1,"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":75,"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/70\/revisions\/75"}],"wp:attachment":[{"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tamats.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}