{"id":1489,"date":"2016-06-26T13:03:10","date_gmt":"2016-06-26T17:03:10","guid":{"rendered":"http:\/\/www.bootdiskrevolution.com\/?p=1489"},"modified":"2016-06-26T13:03:10","modified_gmt":"2016-06-26T17:03:10","slug":"challenge-mode-challenges","status":"publish","type":"post","link":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/challenge-mode-challenges\/","title":{"rendered":"Challenge Mode Challenges"},"content":{"rendered":"<p>I *almost* finished roughing in the unlockable characters this week. Almost!! I really underestimated how much work it would be! For now, I&#8217;ll talk about a few of the hurdles in creating Challenge Mode instead.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1495 aligncenter\" src=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/challenge.png?resize=480%2C270\" alt=\"\" width=\"480\" height=\"270\" srcset=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/challenge.png?w=480&amp;ssl=1 480w, https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/challenge.png?resize=300%2C169&amp;ssl=1 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>I mentioned Challenge Mode a few weeks ago &#8212; it&#8217;s the one where you can fight up to three bosses at once! In general, it was really easy to implement because of how I code my boss fights! Every boss in Bleed 2 is fought inside an &#8220;arena&#8221;, which is just a rectangular area of the level that I mark off in code. It&#8217;s a habit I got into during Bleed 1 when I designed its Challenge Mode.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1497\" src=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/arena1.png?resize=480%2C240\" alt=\"\" width=\"480\" height=\"240\" srcset=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/arena1.png?w=960&amp;ssl=1 960w, https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/arena1.png?resize=300%2C150&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/arena1.png?resize=768%2C384&amp;ssl=1 768w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>Bosses use the rectangle in all of their behaviour. For example: if a boss has an attack where it rushes across the screen, it knows the attack is over once it&#8217;s outside the arena boundaries. Using the boundaries, it also knows where to reappear. If I want a boss to move to the center of the arena, I just tell it to move to the point halfway between the arena boundaries. Etc etc. When Challenge Mode starts, I just create a bunch of bosses and give them the level&#8217;s arena rectangle. It&#8217;s pretty easy!<\/p>\n<p>But.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-1496 aligncenter\" src=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/arena2.png?resize=480%2C244\" alt=\"\" width=\"480\" height=\"244\" srcset=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/arena2.png?w=960&amp;ssl=1 960w, https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/arena2.png?resize=300%2C153&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/arena2.png?resize=768%2C390&amp;ssl=1 768w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>But, it would be boring if all arenas were perfect rectangles &#8212; so they aren&#8217;t. Still, in code, the &#8220;arena&#8221; has to be marked off by a rectangle, which led to some issues.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1492 aligncenter\" src=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/bossIntroO.gif?resize=480%2C270\" alt=\"\" width=\"480\" height=\"270\" srcset=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/bossIntroO.gif?w=480&amp;ssl=1 480w, https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/bossIntroO.gif?resize=300%2C169&amp;ssl=1 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>For example, the Blast Jumper ignores all tile collisions &#8212; the only &#8220;ground&#8221; it knows is the bottom of the arena rectangle. Now that it can be fought in more varied arenas, I had to change how it handled collision detection.<\/p>\n<p><!--more--><\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1498\" src=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/floorDetectionNarrow.png?resize=480%2C319\" alt=\"\" width=\"480\" height=\"319\" srcset=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/floorDetectionNarrow.png?w=512&amp;ssl=1 512w, https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/floorDetectionNarrow.png?resize=300%2C199&amp;ssl=1 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>Now a ray (yellow in the picture, I know it&#8217;s small) is shot from each of the Blast Jumper&#8217;s feet, looking for tile collisions. The highest collision it finds is the new &#8220;floor&#8221;! If that value is lower than the arena floor (the lowest pink line), the arena floor is used instead. Voila!<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1491 aligncenter\" src=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/bossCorrectO.gif?resize=480%2C270\" alt=\"\" width=\"480\" height=\"270\" srcset=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/bossCorrectO.gif?w=480&amp;ssl=1 480w, https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/bossCorrectO.gif?resize=300%2C169&amp;ssl=1 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>That&#8217;s just one of the many small issues that arose. Another quick one would be how elements interact with large reflected bullets.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1494 aligncenter\" src=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/wrongBlockingShortO.gif?resize=480%2C270\" alt=\"\" width=\"480\" height=\"270\" srcset=\"https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/wrongBlockingShortO.gif?w=480&amp;ssl=1 480w, https:\/\/i0.wp.com\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-content\/uploads\/2016\/06\/wrongBlockingShortO.gif?resize=300%2C169&amp;ssl=1 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>All entities have a flag letting them know if they block those big reflected bullets. The Chaff Spammer fight doesn&#8217;t use any big bullets, so I never had to pay attention to that flag for any of its elements. Things got messed up once big bullets were introduced, but it was an easy fix. I went through all the bosses and set their flags appropriately&#8230; I think I got them all!<\/p>\n<p>So there you have it! This week I&#8217;ll deliver the finishing blow to unlockable characters and start working on cheevos!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I *almost* finished roughing in the unlockable characters this week. Almost!! I really underestimated how much work it would be! For now, I&#8217;ll talk about a few of the hurdles in creating Challenge Mode instead. I mentioned Challenge Mode a few weeks ago &#8212; it&#8217;s the one where you can fight up to three bosses <a class=\"read-more\" href=\"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/challenge-mode-challenges\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1489","post","type-post","status-publish","format-standard","hentry","category-bleed-2"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/posts\/1489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/comments?post=1489"}],"version-history":[{"count":6,"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/posts\/1489\/revisions"}],"predecessor-version":[{"id":1504,"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/posts\/1489\/revisions\/1504"}],"wp:attachment":[{"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/media?parent=1489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/categories?post=1489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bootdiskrevolution.com\/NEW_BLOG\/wp-json\/wp\/v2\/tags?post=1489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}