{"id":2791,"date":"2015-04-11T04:16:21","date_gmt":"2015-04-11T04:16:21","guid":{"rendered":"http:\/\/astoryisnotatree.net\/?p=2791"},"modified":"2020-03-04T21:05:10","modified_gmt":"2020-03-04T21:05:10","slug":"bad-guy-object-design","status":"publish","type":"post","link":"https:\/\/astoryisnotatree.net\/?p=2791","title":{"rendered":"Bad Guys: Object Design"},"content":{"rendered":"<p>The enemy showcases three distinct states &#8211; dodging, advancing, and recharging. When it is not doing one of these three, its &#8220;idle&#8221; state is steadily moving back and forth and firing shots at a rhythmic pace.<\/p>\n<p><a href=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4644.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-2793\" src=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4644-300x120.jpg\" alt=\"IMG_4644\" width=\"510\" height=\"204\" srcset=\"https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4644-300x120.jpg 300w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4644-624x249.jpg 624w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4644.jpg 1000w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>The enemy&#8217;s total health in conjunction with its quantitative distance from the player act to determine the <em>frequency <\/em>of when its states are called. For example, if the enemy&#8217;s health is low, it will attempt to recharge and strafe more frequently, but its distance from the player has the final say in whether the state is even executable.<\/p>\n<p><a href=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4646.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-2795\" src=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4646-300x200.jpg\" alt=\"IMG_4646\" width=\"501\" height=\"334\" srcset=\"https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4646-300x200.jpg 300w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4646-624x416.jpg 624w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4646.jpg 800w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/a><\/p>\n<p>With both variables interacting with one another, the state probabilities are in constant flux, simulating spontaneous behavior. I&#8217;m still unsure of what my exact formula will be to determine frequency, but I&#8217;m pointing in the direction of either a modulo timer with a changing limit or a randomizer with a changing scale (or a combination of the two).<\/p>\n<p><a href=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4648.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-2794\" src=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4648-300x200.jpg\" alt=\"IMG_4648\" width=\"503\" height=\"335\" srcset=\"https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4648-300x200.jpg 300w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4648-624x416.jpg 624w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4648.jpg 1000w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4643.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-2792\" src=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4643-300x200.jpg\" alt=\"IMG_4643\" width=\"503\" height=\"335\" srcset=\"https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4643-300x200.jpg 300w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4643-624x416.jpg 624w, https:\/\/astoryisnotatree.net\/wp-content\/uploads\/2015\/04\/IMG_4643.jpg 1000w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The enemy showcases three distinct states &#8211; dodging, advancing, and recharging. When it is not doing one of these three, its &#8220;idle&#8221; state is steadily moving back and forth and firing shots at a rhythmic pace. The enemy&#8217;s total health&#8230;<\/p>\n","protected":false},"author":37,"featured_media":2793,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[125],"tags":[140],"class_list":["post-2791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bad-guys","tag-state-chart","wpcat-125-id"],"_links":{"self":[{"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/posts\/2791","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\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2791"}],"version-history":[{"count":2,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/posts\/2791\/revisions"}],"predecessor-version":[{"id":13267,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/posts\/2791\/revisions\/13267"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=\/wp\/v2\/media\/2793"}],"wp:attachment":[{"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/astoryisnotatree.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}