{"id":1280,"date":"2014-12-08T05:47:00","date_gmt":"2014-12-08T05:47:00","guid":{"rendered":"http:\/\/astoryisnotatree.net\/?p=1280"},"modified":"2020-04-29T21:26:05","modified_gmt":"2020-04-29T21:26:05","slug":"particles-game-4","status":"publish","type":"post","link":"https:\/\/astoryisnotatree.net\/?p=1280","title":{"rendered":"Games from Nothing: Black &#038; White Exercise #4 \u2014 Particles"},"content":{"rendered":"<p><a href=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1281\" src=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring-300x225.png\" alt=\"ring\" width=\"499\" height=\"374\" srcset=\"https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring-300x225.png 300w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring-624x468.png 624w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring.png 800w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<p>For our introduction to particle systems, I modified existing\u00a0code of both the rings and particles. In my first attempt with the rings I\u00a0altered the time taken for the rings to &#8216;expire&#8217; or disappear from the screen. Then changed the color variables and set them to randomly increment and then put the final value modulo\u00a0255 to get a variable in range. \u00a0The rings are initialized whenever they a point is pressed on the screen. From there the rings spread out \u00a0and the colors pulse with each set of rings taking a different color.<\/p>\n<p><a href=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1282\" src=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring1-300x225.png\" alt=\"ring1\" width=\"503\" height=\"377\" srcset=\"https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring1-300x225.png 300w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring1-624x468.png 624w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/ring1.png 800w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/a><\/p>\n<p>The third picture shows the modifications I made to the particle system. Again I randomized the colors but also inverted gravity to create an upward stream. In addition, instead of a single stream, I added two more points the particles could come from on either side of the initial stream. This simple alteration along with movement creates a feeling of greater volume akin to a smoke effect from a fire.<\/p>\n<p><a href=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/Particle.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1289\" src=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/Particle-300x225.png\" alt=\"Particle\" width=\"503\" height=\"377\" srcset=\"https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/Particle-300x225.png 300w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/Particle-624x468.png 624w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/Particle.png 800w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For our introduction to particle systems, I modified existing\u00a0code of both the rings and particles. In my first attempt with the rings I\u00a0altered the time taken for the rings to &#8216;expire&#8217; or disappear from the screen. Then changed the color&#8230;<\/p>\n","protected":false},"author":24,"featured_media":1281,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[117,16],"class_list":["post-1280","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-games-from-nothing","tag-particles","tag-black-white-exercises","wpcat-5-id"],"_links":{"self":[{"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/posts\/1280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1280"}],"version-history":[{"count":4,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/posts\/1280\/revisions"}],"predecessor-version":[{"id":13862,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/posts\/1280\/revisions\/13862"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/media\/1281"}],"wp:attachment":[{"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}