{"id":311,"date":"2013-03-17T22:49:07","date_gmt":"2013-03-17T21:49:07","guid":{"rendered":"http:\/\/www.radicalfishgames.com\/?p=311"},"modified":"2013-03-19T12:23:35","modified_gmt":"2013-03-19T11:23:35","slug":"weekly-update-9-a-bug-and-looping-music","status":"publish","type":"post","link":"https:\/\/www.radicalfishgames.com\/?p=311","title":{"rendered":"Weekly Update #9 A Bug and Music"},"content":{"rendered":"<p>Hello and a happy Saint Patrick&#8217;s Day!<\/p>\n<p>This week we worked a lot on the already mentioned font system (screens will follow when it&#8217;s finished) and more sound\/music related work. We also stumbled upon a very strange bugs that occurs in newer versions of Chrome!<\/p>\n<h2>And suddenly a Bug<\/h2>\n<p>Some days ago we worked on <strong>CrossCode<\/strong> and found a bug that was introduced to the dev-channel and canary builds of Chrome at some point this week (at least we assume this). It messed up our physics system and resets the position of the player entity to 1 on the x- or y-axis. Of course we immediately tried to fix this and found a strange workaround that solved the problem. We updated the current version on <a href=\"www.cross-code.com\" target=\"_blank\">www.cross-code.com<\/a> accordingly, <strong>so it should work again<\/strong>. If you want to see the bug you can use this link:<\/p>\n<p><a href=\"http:\/\/www.cross-code.com\/index.buggy.php\" target=\"_blank\">Buggy CrossCode TechDemo<\/a><\/p>\n<p>Simply start the game and when the information window pops up, press the skip button. Then proceed normally. All entities or at least some should be on and the far left or top-left of the map. You can still use the controls but you can&#8217;t really do anything because you are outside the map. If the game runs normally you have luck or you do not use the dev-channel\/Canary builds from Chrome.<br \/>\nHere is a screen which shows the bug &#8220;in Action&#8221;:<br \/>\n<a href=\"http:\/\/www.radicalfishgames.com\/wp-content\/uploads\/bug_chrome.png\"><img decoding=\"async\" src=\"http:\/\/www.radicalfishgames.com\/wp-content\/uploads\/bug_chrome-300x200.png\" alt=\"bug_chrome\" width=\"300\" height=\"200\" class=\"aligncenter size-medium wp-image-318\" srcset=\"https:\/\/www.radicalfishgames.com\/wp-content\/uploads\/bug_chrome-300x200.png 300w, https:\/\/www.radicalfishgames.com\/wp-content\/uploads\/bug_chrome-450x300.png 450w, https:\/\/www.radicalfishgames.com\/wp-content\/uploads\/bug_chrome.png 960w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> The bug behaves really random, so it might look different when you test it.<br \/>\nNow, even though we solved this bug technically, we did so by adding a <strong>side-effect free<\/strong> statement in the code that should not change any behaviour. This hints to a serious bug in the JavaScript interpretation of Chrome, most likely due to some optimizations with V8.<br \/>\nBecause of that, we created a bug report in Chromium, which you can find here:<\/p>\n<p><a href=\"https:\/\/code.google.com\/p\/chromium\/issues\/detail?id=201590\" target=\"_blank\">Issues Report<\/a><\/p>\n<p>The report goes a bit more into the details of the bug if you want to know more about it.<\/p>\n<h2>Music<\/h2>\n<p>Integrating music into the game proves to be more complicated than we originally  thought. impact.js made the interesting choice of designing its music interface after a common music player with playlists, shuffle and loop.<br \/>\nFor CrossCode (and most games we think) a more useful interface would have a focus on individual, looping songs that can be exchanged and interrupted with other looping or non looping songs as requested. Thus we rewrote more or less the whole of ig.Music.<br \/>\nWe also tried to figure out a way to make the music loop more cleanly. Simply looping audio when ended usually results in small delays. We currently use a work around where we use two instances of the same song, playing them alternating with a light overlap. This works better, but still not perfect, as the delay on loop seems to be slightly random. For a better implementation we plan to use the <a href=\"https:\/\/dvcs.w3.org\/hg\/audio\/raw-file\/tip\/webaudio\/specification.html\" target=\"_blank\">WebAudio API<\/a>, if available.<\/p>\n<p>And that&#8217;s it for this week! 2 Weeks until the release of the <strong>TechDemo++<\/strong>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello and a happy Saint Patrick&#8217;s Day! This week we worked a lot on the already mentioned font system (screens will follow when it&#8217;s finished) and more sound\/music related work. We also stumbled upon a very strange bugs that occurs in newer versions of Chrome! And suddenly a Bug Some days ago we worked on [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-crosscode","category-weekly"],"_links":{"self":[{"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311"}],"version-history":[{"count":36,"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":348,"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions\/348"}],"wp:attachment":[{"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.radicalfishgames.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}