{"id":1619,"date":"2014-11-22T21:19:00","date_gmt":"2014-11-22T21:19:00","guid":{"rendered":"http:\/\/www.spellcasterstudios.com\/?p=1619"},"modified":"2014-11-18T19:31:36","modified_gmt":"2014-11-18T19:31:36","slug":"more-indoors-behaviors","status":"publish","type":"post","link":"https:\/\/www.spellcasterstudios.com\/?p=1619","title":{"rendered":"More indoors behaviors"},"content":{"rendered":"<p align=\"justify\">Today was very tiring to get the AI behavior just like I wanted when indoors\u2026<\/p>\n<p align=\"justify\"><a href=\"http:\/\/www.spellcasterstudios.com\/wp-content\/uploads\/2014\/11\/screen308.jpg\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"screen308\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"screen308\" src=\"http:\/\/www.spellcasterstudios.com\/wp-content\/uploads\/2014\/11\/screen308_thumb.jpg\" width=\"830\" height=\"482\" \/><\/a><\/p>\n<p align=\"justify\">That and the pull of \u201cWarlords of Draenor\u201d made it very hard to work! <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-top-style: none; border-bottom-style: none; border-right-style: none; border-left-style: none\" alt=\"Smile\" src=\"http:\/\/www.spellcasterstudios.com\/wp-content\/uploads\/2014\/11\/wlEmoticon-smile7.png\" \/><\/p>\n<p align=\"justify\">Anyway, I had to tweak, and tweak, and tweak, and a once little, simple, beautiful script becomes a tangled mess again because of fringe cases\u2026 I really need to figure out a better way to architect\/structure AI code\u2026 It becomes messy very quickly (even if it isn\u2019t as messy now as when I started, and it\u2019s way more robust)\u2026 Probably some data-driven structures to encapsulate cause-and-effect (which is a bit how human beings work), plus some constructs to help out (for example, how long have we been in a certain state or conditional timers like \u201chow long have we had no LOS on the enemy\u201d?). When I go back to \u201cGrey\u201d, I\u2019ll have to delve seriously into this, before I spend more time on the AI than I\u2019ve already done.<\/p>\n<p align=\"justify\"><em>Now listening to \u201cSpace Police \u2013 Defenders of the Crown\u201d by \u201cEdguy\u201d<\/em><\/p>\n<p align=\"justify\"><em>Link of the Day: This is an extremely elegant solution to the scripting language binding issues normally present on engines. The only drawback (that I can see) is the fact that it requires a very modern compiler to work: <a title=\"http:\/\/www.gamedev.net\/page\/resources\/_\/technical\/general-programming\/implementing-a-meta-system-in-c-r3905\" href=\"http:\/\/www.gamedev.net\/page\/resources\/_\/technical\/general-programming\/implementing-a-meta-system-in-c-r3905\">http:\/\/www.gamedev.net\/page\/resources\/_\/technical\/general-programming\/implementing-a-meta-system-in-c-r3905<\/a>. Personally, I\u2019m using a slightly different (and not so elegant) solution: I built an utility that scans the code files for some tags and exposes the methods I want (and I\u2019m not exposing the variables themselves, besides through assessors, which can be generated automatically).<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today was very tiring to get the AI behavior just like I wanted when indoors\u2026 That and the pull of \u201cWarlords of Draenor\u201d made it very hard to work! Anyway, I had to tweak, and tweak, and tweak, and a once little, simple, beautiful script becomes a tangled mess again because of fringe cases\u2026 I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,147,8],"tags":[23],"class_list":["post-1619","post","type-post","status-publish","format-standard","hentry","category-development","category-chrome-hunter","category-technology","tag-ai"],"_links":{"self":[{"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=\/wp\/v2\/posts\/1619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1619"}],"version-history":[{"count":1,"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=\/wp\/v2\/posts\/1619\/revisions"}],"predecessor-version":[{"id":1620,"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=\/wp\/v2\/posts\/1619\/revisions\/1620"}],"wp:attachment":[{"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.spellcasterstudios.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}