{"id":41,"date":"2013-06-23T20:26:20","date_gmt":"2013-06-23T20:26:20","guid":{"rendered":"http:\/\/redquark.com\/wp\/?p=41"},"modified":"2017-03-31T02:40:16","modified_gmt":"2017-03-31T02:40:16","slug":"looks-like-i-am-out-of-time","status":"publish","type":"post","link":"https:\/\/redquark.com\/wp\/?p=41","title":{"rendered":"Looks Like I Am Out of Time"},"content":{"rendered":"<p>I tried adding the floor using Tiled and TexturePacker &#8212; I really did. Unfortunately, it does not appear to be working and I really don&#8217;t have time to fix it now. The code\u00a0and files are all there, so it probably won&#8217;t be too hard to get it working once I do find time. I do have a question about it though. Why is there no callback to let us know when it has finished loading?<\/p>\n<p>One weird thing is that &#8220;spritesheet.js&#8221; will not load at all. In fact, it completely hangs up the asset loader Javascript code and keeps the game from running. I had to comment it out. I was not really using spritesheet.js anyway, but I find it curious that it could somehow stop the show even though I was not calling that code. Another mystery to be solved when I have the time &#8212; later.<\/p>\n<p>And speaking of the asset loader and atlases, I asked the following\u00a0question on the Udacity forum and as far as I know at the time of this writing there has been no reply yet. Here is the question:<\/p>\n<p>If loading images one at a time is such a bottleneck that we create a single image instead and then use it as an atlas, why don&#8217;t we combine all of our Javascript files into one file? (Probable answer: very different file sizes and load times between images and plain text.) Given that I have to flush my browser&#8217;s cache (or tell it not to cache in the first place) in order to run my latest Javascript code anyway, it seems like it would not be such a hardship to keep it all in one file. That is generally not good programming practice, I know, but given all of these other issues, it seems reasonable &#8212; and if not, at least after everything is finished it seems reasonable to combine all of the Javascript into one file. This is particularly the case because I ended up having to load my Javascript files in at least three batches to avoid race conditions on code dependency.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I tried adding the floor using Tiled and TexturePacker &#8212; I really did. Unfortunately, it does not appear to be working and I really don&#8217;t have time to fix it now. The code\u00a0and files are all there, so it probably won&#8217;t be too hard to get it working once I do find time. I do [&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],"tags":[],"class_list":["post-41","post","type-post","status-publish","format-standard","hentry","category-html5-game-development"],"_links":{"self":[{"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/41","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=41"}],"version-history":[{"count":5,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/41\/revisions"}],"predecessor-version":[{"id":103,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/41\/revisions\/103"}],"wp:attachment":[{"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}