{"id":159,"date":"2012-01-21T07:47:14","date_gmt":"2012-01-21T07:47:14","guid":{"rendered":"http:\/\/www.zombox.net\/?p=159"},"modified":"2012-07-04T21:51:55","modified_gmt":"2012-07-04T21:51:55","slug":"building-and-repairing","status":"publish","type":"post","link":"http:\/\/www.zombox.net\/?p=159","title":{"rendered":"Building and repairing&#8230;"},"content":{"rendered":"<p>Hey everyone,<\/p>\n<p>First, I apologize for the lack of updates the last couple of weeks. Some extra work was occupying my free time and I couldn&#8217;t work on Zombox as much as I wanted.<\/p>\n<p>Regardless, I&#8217;ve got quite a big update this week, because Zombox now features a construction system! You can use it to build your own custom buildings and shelters. Once a wall or doorway is built, it only has partial HP, so a player must use the &#8220;Construction Mallet&#8221; (a new item) to repair it to full health. The &#8220;Construction Mallet&#8221; can be used to repair any object in the game world. The mallet is currently unbalanced, so there&#8217;s no penalty for using it to repair something, but eventually I plan to integrate it into the ammo system, or have it drain the player&#8217;s money during repairs, or something else in order to persuade the player to use it wisely.<\/p>\n<p>I&#8217;ve also modified the inventory UI a bit to make way for the upcoming crafting system, as well as the supply system. Because it doesn&#8217;t make sense for a player to be able to build walls and doorways without the proper supplies, eventually you&#8217;ll need to collect scrap metal\/wood\/concrete before being able to build things. While this system isn&#8217;t yet integrated fully, the UI has three new item slots in the bottom left to keep track of the amount of building supplies the player is carrying. Also, in the bottom right of the new UI are three new tabs, which the user can click on to quickly switch between the examination window, the crafting window, and the settings window.<\/p>\n<p>During my work on Zombox in the last weeks, I also implemented <a href=\"http:\/\/harablog.wordpress.com\/2011\/09\/07\/\">Jump Point Searching<\/a> into the pathfinding algorithm. However, even though JPS performed better than vanilla A* on full paths, the current pathfinding system in Zombox is highly optimized towards returning partial paths, and JPS doesn&#8217;t return very good partial paths due to the way it expands nodes. So I ended up reverting back to my old pathfinding system. I worked on optimizing it further too, so it now performs about 40% faster.<\/p>\n<p>Here are some images and animations demonstrating the changes listed above!<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone\" title=\"New UI\" src=\"http:\/\/www.zombox.net\/stuff\/zombox_45.jpg\" alt=\"\" width=\"480\" height=\"320\" \/><\/p>\n<p><a href=\"http:\/\/www.zombox.net\/stuff\/zombox_cap_20.gif\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone\" title=\"Building walls\" src=\"http:\/\/www.zombox.net\/stuff\/zombox_cap_20.jpg\" alt=\"\" width=\"480\" height=\"320\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.zombox.net\/stuff\/zombox_cap_21.gif\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone\" title=\"Building walls\" src=\"http:\/\/www.zombox.net\/stuff\/zombox_cap_21.jpg\" alt=\"\" width=\"480\" height=\"320\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey everyone, First, I apologize for the lack of updates the last couple of weeks. Some extra work was occupying my free time and I couldn&#8217;t work on Zombox as much as I wanted. Regardless, I&#8217;ve got quite a big update this week, because Zombox now features a construction system! You can use it to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,7,3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.zombox.net\/index.php?rest_route=\/wp\/v2\/posts\/159"}],"collection":[{"href":"http:\/\/www.zombox.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zombox.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zombox.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zombox.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=159"}],"version-history":[{"count":4,"href":"http:\/\/www.zombox.net\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":245,"href":"http:\/\/www.zombox.net\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions\/245"}],"wp:attachment":[{"href":"http:\/\/www.zombox.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zombox.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zombox.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}