{"author_name":"JeeshusChrist","cat":"LD #28","comments":[],"epoch":1387476900,"likes":1,"metadata":{"p_key":"34207","p_author":"JeeshusChrist","p_authorkey":"21804","p_urlkey":"69753","p_title":"Man Behind the AI: Postmortem (TCOBON)","p_cat":"LD #28","p_event":"LD28","p_time":"1387476900","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"21804","us_name":"JeeshusChrist","us_username":"jeeshuschrist","event_start":"1386892800","event_key":"20","event_name":"LD28"},"text":"<p>Game Link:\u00a0<a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-28\/?action=preview&amp;uid=21804\">http:\/\/www.ludumdare.com\/compo\/ludum-dare-28\/?action=preview&amp;uid=21804<\/a><\/p>\n <p>Gameplay video: http:\/\/www.youtube.com\/watch?v=RRsR_DTW6JI<\/p>\n <p><strong>Postmortem of Chase Hutchens:<\/strong><\/p>\n <p>I&#8217;ve been following Ludum Dare for a while, I was definitely interested in entering eventually, I just didn&#8217;t expect it to be this one. I actually didn&#8217;t plan on entering this one at all initially. But then I saw posts from another group member, which enticed me to attempt to join their planned Game Jam session.<\/p>\n <p>My task was to implement some sort of AI. I had prior experience with A*, so I knew with our layout that will be the best option for getting the enemies to move interestingly. The first time I implemented A* it took me some time, however, that past knowledge was able to allow me to understand the problems that needed to be solved on my end to get it working properly. A* took me a good day to implement, a long with it&#8217;s grid generator system.<\/p>\n <p>Now that I had A* working, I needed to begin developing some sort of logic within the bots to provide some sort of interest. This brought forth some difficulties, due to this being the first time implementing AI behavior with A*.<\/p>\n <p>What I ended up doing was creating a bunch of node objects that I placed around the maps. From there, I had to piece together various events for the bots to re-act to. I decided, from past experience using a state-machine hierarchy would be a good strategy. When a bot doesn&#8217;t have a shuriken to fetch it would travel around randomly, by selecting a random node on the map. If a shuriken is thrown in it&#8217;s direction, it would choose another random node to travel to, in hopes of dodging getting hit. From there, if it was the closest bot to the dropped shuriken it would proceed to attempt to collect the shuriken. Also, the bots would change directions after a shuriken was picked up. This was the majority of where my time lied. Attempting to create code for the bots to know when to re-act to a situation.<\/p>\n <p>Some of the issues I faced during this process was, when the bot chooses to travel to the dropped shuriken, if it was out of reach and not colliding with it, it would hover at the location indefinitely. The bot had to collide with the shuriken to collect it. I had to keep track of how long that particular bot was hovering in the adjacent square. Another issue was a crash bug that would make a bot attempt to continually search for the shuriken when it somehow left the arena. That issue is still somewhat present, where the bots will try to get to a shuriken in a non-reachable location. It does however, seem to fix itself.<\/p>\n <p>Overall, it was both fun and interesting to create a project with like-minded individuals. The AI isn&#8217;t great, but I&#8217;m just glad I was able to obtain more experience related to working with both AI and A*. I look forward to the Ludum Dares to come.<\/p>","time":"December 19th, 2013 1:15 pm","title":"Man Behind the AI: Postmortem (TCOBON)"}