{"id":135,"date":"2009-06-21T11:44:54","date_gmt":"2009-06-21T10:44:54","guid":{"rendered":"http:\/\/www.puppygames.net\/blog\/?p=135"},"modified":"2009-06-21T11:44:54","modified_gmt":"2009-06-21T10:44:54","slug":"and-yet-more-droid-assault","status":"publish","type":"post","link":"https:\/\/www.puppygames.net\/blog\/?p=135","title":{"rendered":"And yet more Droid Assault!"},"content":{"rendered":"<p>Whilst working on our new game (do you remember, many moons ago, <a title=\"Monster Mash blog post\" href=\"https:\/\/www.puppygames.net\/blog\/?p=54\">we had a game called Monster Mash?<\/a> Well, it&#8217;s still under development, and edging closer to being fun), I cut &#8216;n&#8217; pasted the A* pathfinding algorithm from the multicore brains in Droid Assault into it. The A* algorithm is used in two places in the new game: in the first instance, to ensure that your bases are accessible by at least one enemy spawn point; and in the second instance, so that the gidrahs will trundle towards the base.<\/p>\n<p>The map in the new game &#8211; OK, let&#8217;s call it Monster Mash even though it&#8217;s not called Monster Mash any more &#8211; is randomly generated every level. It&#8217;s a pretty trivial random generation, which simply involves starting with a map of solid rock, and then carving holes out of it between the bases and spawn points, plus a few other random holes. The end result is pretty nice, with results ranging from about 50% rock to 90% empty. Then we plonk down up to 10 bases which you have to defend (+1 base every 10 levels) &#8211; if any one base gets destroyed you lose. And then we plonk gidrah spawn points around the edge of the map, and a few in the middle on the later levels.<\/p>\n<p>Before it approves the map, the generator checks to ensure that every base is accessible to at least one spawn point. We do this by just plotting the path between them using the A* algorithm pinched from Droid Assault.<\/p>\n<p>It didn&#8217;t work.<\/p>\n<p>I removed some more of my remaining hair in a violent thrashy motion for a couple of hours.<\/p>\n<p><em>&#8220;How could this be? It&#8217;s been working fine in Droid Assault for a year!&#8221; <\/em>I ranted.<\/p>\n<p>Except, of course, it hadn&#8217;t. It had been broken all along. All those lovely multicore droids you&#8217;d been capturing, hoping they were worth the extra points just because they had the best brains, <em>never worked properly<\/em>. It&#8217;s a miracle they ever managed to find any enemies. In fact it&#8217;s only because they have a backup brain that switches to direct attack when enemies are in direct line-of-sight that they ever got around to attacking anything.<\/p>\n<p>So: it&#8217;s fixed. And while I was at it, I changed the way flamethrowers inflict damage &#8211; it&#8217;s more immediate, and the burn time is much shorter. And slowed the wear rate of droids down a little bit so you can keep them a bit longer. Enjoy the new version! Grab version\u00a0<strong>1.6<\/strong> <a title=\"download Droid Assault 1.6\" href=\"https:\/\/www.puppygames.net\/droid-assault\">directly from Puppygames<\/a>.<\/p>\n<p>Chaz is going to do a bit of work on the graphics for Monster Mash over the next week or so, and as soon as it&#8217;s worth showing everyone, we&#8217;ll pop up a screenshot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whilst working on our new game (do you remember, many moons ago, we had a game called Monster Mash? Well, it&#8217;s still under development, and edging closer to being fun), I cut &#8216;n&#8217; pasted the A* pathfinding algorithm from the multicore brains in Droid Assault into it. The A* algorithm is used in two places [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,1],"tags":[],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-diary","category-news"],"_links":{"self":[{"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/135"}],"collection":[{"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=135"}],"version-history":[{"count":1,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":136,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/135\/revisions\/136"}],"wp:attachment":[{"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}