{"id":353,"date":"2015-09-05T22:12:05","date_gmt":"2015-09-05T22:12:05","guid":{"rendered":"http:\/\/www.brasswatchgames.com\/?p=353"},"modified":"2015-09-05T22:12:05","modified_gmt":"2015-09-05T22:12:05","slug":"shipyard-development-news-5-september-2015","status":"publish","type":"post","link":"http:\/\/brasswatchgames.com\/?p=353","title":{"rendered":"Shipyard Development News 5 September 2015"},"content":{"rendered":"<p>It&#8217;s been a while since I posted a true development news&#8211;more than two months in fact&#8211;and it&#8217;s time to rectify that!<\/p>\n<p><strong>Internal System Map<\/strong><\/p>\n<p>One of the most important changes in the new update is also one of the\u00a0most boring to explain. In the current version, a ship&#8217;s systems are stored in a one-dimensional list. If the game needs to find the system at a particular tile (in two dimensions), it needs to go one-by-one down the list and check each system to see if the tile is within its boundaries. This worked fine when systems were large and few, but now that there are potentially hundreds of tiny free-form systems, there is a much longer list to go through. I found that this caused the game to lag, especially when painting a large area.<\/p>\n<p>The system map fixes this problem. What is the system map? I&#8217;m glad you asked! The system map is a two-dimensional\u00a0grid corresponding to the tiles in your ship, with each tile containing the ID number of the system which occupies it (or -1 if it is empty). When you place a system, the map is automatically updated with its ID number in every tile that it covers. This way, the game only needs to check the map to find the ID number of the correct system, and can then jump directly to its position in the list. This cuts out a lot of unnecessary operations, and thus significantly reduces lag.<\/p>\n<p><strong>New Ship Editor<\/strong><\/p>\n<p>Part of the reason I mentioned the system map is that it enables an important feature of the new ship editor: continuous painting. In the current version, placing multiple systems requires repeatedly clicking. Again, this wasn&#8217;t a major problem with large, fixed-size systems but it quickly becomes infuriating with free-form ones. The new ship editor allows you to paint continuously by holding down the mouse button.\u00a0&#8220;But that&#8217;s so obvious!&#8221; you say. &#8220;Why didn&#8217;t you do that already?&#8221; The main reason was to do with the system-list lag mentioned above. Because each system needs to check that every tile within its boundaries is empty before being placed, it used to require that laggy one-by-one list checking. As I discovered when I first implemented it, this made the paint function painfully clunky.\u00a0Now, thanks to the system map, the check can be done fast enough to make painting\u00a0as convenient as it was intended to be.<\/p>\n<p>Oh, right, I haven&#8217;t actually posted a screenshot yet. Let me fix that:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.brasswatchgames.com\/wp-content\/uploads\/2015\/09\/scrn_2015_09_05_1441490271062.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-356\" src=\"https:\/\/i0.wp.com\/www.brasswatchgames.com\/wp-content\/uploads\/2015\/09\/scrn_2015_09_05_1441490271062.png?resize=1292%2C732\" alt=\"New Ship Editor Preview\" width=\"1292\" height=\"732\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>You&#8217;ll note a few things about the new editor:<\/p>\n<ul>\n<li>The construction area takes up the entire screen, with the tools being small\u00a0objects on top of it. No more tiny viewport limiting your view to a ninth the size of the construction area.<\/li>\n<li>Hotbar to quickly switch between tools as well as interior\/exterior views.<\/li>\n<li>Systems list is large enough to show the full name of the systems, and has them organized alphabetically.<\/li>\n<\/ul>\n<p>That&#8217;s all for now! I&#8217;ll keep working though so I have more to show before another two months has passed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been a while since I posted a true development news&#8211;more than two months in fact&#8211;and it&#8217;s time to rectify that! Internal System Map One of the most important changes in the new update is also one of the\u00a0most boring to explain. In the current version, a ship&#8217;s systems are stored in a one-dimensional list. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[2,4,1],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4ieDM-5H","jetpack-related-posts":[{"id":203,"url":"http:\/\/brasswatchgames.com\/?p=203","url_meta":{"origin":353,"position":0},"title":"Shipyard Development News 8 August 2014","date":"August 8, 2014","format":false,"excerpt":"It's been a while since I posted one of these, mainly because I've been working more on the Sooper Seecret Tank Project\u00a0than on Shipyard over the last couple weeks. However, as Shipyard is still the primary focus of this site at the moment, I figured I had better share what\u2026","rel":"","context":"In &quot;Game Development News&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":687,"url":"http:\/\/brasswatchgames.com\/?p=687","url_meta":{"origin":353,"position":1},"title":"New Shipyard: Big improvements to the ship editor","date":"July 2, 2018","format":false,"excerpt":"As the first part of the game I created way back in 2013, the ship editor was easily the most naively designed and coded section of the game. My planned redesign of the interface in the never-completed Alpha 1.0 version addressed some of the problems, but the fix was only\u2026","rel":"","context":"In &quot;Game Development News&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":397,"url":"http:\/\/brasswatchgames.com\/?p=397","url_meta":{"origin":353,"position":2},"title":"Shipyard Development News 4 April 2016 &#8212; Back From the Dead Edition","date":"April 7, 2016","format":false,"excerpt":"It's been a long time. Like, a really long time. Like more than half a year. Yeah... Sorry about that. I can't even say I've been especially active either. Between starting my first year at university and various other real-life engagements, as well as a general lack of inspiration, development\u2026","rel":"","context":"In &quot;Game Development News&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":264,"url":"http:\/\/brasswatchgames.com\/?p=264","url_meta":{"origin":353,"position":3},"title":"Shipyard Pre-Alpha 0.8.1a Hotfix Update","date":"November 24, 2014","format":false,"excerpt":"Someone found a bug in 0.8.1 whereby enemy ships could kill nonexistent crew, thereby causing a system to have a negative number of crew inside. This, in turn, would cause the system to be \"negative repaired\" by five times the number of anti-crew per turn.\u00a0This would cause systems to have\u2026","rel":"","context":"In &quot;Game Development News&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":233,"url":"http:\/\/brasswatchgames.com\/?p=233","url_meta":{"origin":353,"position":4},"title":"Shipyard Development News 9 Nov. 2014","date":"November 9, 2014","format":false,"excerpt":"I can finally say that\u00a0I've actually made good progress on shuttles since my last post! I'm still far from finished, as I'll explain below, but progress is actually happening. Here's what I've done so far: There is one type of shuttle implemented: the Light Fighter. It can be sent to\u2026","rel":"","context":"In &quot;Game Development News&quot;","img":{"alt_text":"scrn_2014_11_09_1415571302837","src":"https:\/\/i0.wp.com\/www.brasswatchgames.com\/wp-content\/uploads\/2014\/11\/scrn_2014_11_09_1415571302837-1024x576.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":181,"url":"http:\/\/brasswatchgames.com\/?p=181","url_meta":{"origin":353,"position":5},"title":"Shipyard Development News 18 June 2014","date":"June 19, 2014","format":false,"excerpt":"Since I posted my outline for version 0.8.1, a good friend of mine who I'd asked to write some music for Shipyard sent me what he'd come up with. This came as a surprise to me, as I hadn't been expecting him to finish so quickly. This prompted me to\u2026","rel":"","context":"In &quot;Game Development News&quot;","img":{"alt_text":"scrn_2014_06_18_1403139780680","src":"https:\/\/i0.wp.com\/www.brasswatchgames.com\/wp-content\/uploads\/2014\/06\/scrn_2014_06_18_1403139780680.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/brasswatchgames.com\/index.php?rest_route=\/wp\/v2\/posts\/353"}],"collection":[{"href":"http:\/\/brasswatchgames.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/brasswatchgames.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/brasswatchgames.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/brasswatchgames.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=353"}],"version-history":[{"count":0,"href":"http:\/\/brasswatchgames.com\/index.php?rest_route=\/wp\/v2\/posts\/353\/revisions"}],"wp:attachment":[{"href":"http:\/\/brasswatchgames.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/brasswatchgames.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/brasswatchgames.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}