{"id":88,"date":"2023-08-06T07:30:45","date_gmt":"2023-08-06T07:30:45","guid":{"rendered":"https:\/\/blogs.scummvm.org\/hax0kartik\/?p=88"},"modified":"2023-08-06T07:30:45","modified_gmt":"2023-08-06T07:30:45","slug":"finishing-audio-and-polishing-the-engine-code-for-pr","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/hax0kartik\/2023\/08\/06\/finishing-audio-and-polishing-the-engine-code-for-pr\/","title":{"rendered":"Finishing audio and polishing the engine code for PR"},"content":{"rendered":"<p>Hi all, welcome back to my progress blog for CRAB. This week, I worked on finishing the audio and made many other minor changes to gear up for getting my fork merged into the main branch.<\/p>\n<p>The audio subsystem is fully in-place aside from the background music&#8217;s &#8220;fade-in&#8221; effect. You are able to set the SFX volume and the music volume from ScummVM&#8217;s game options menu. I fixed a variety of bugs in the audio system which could lead to crashes sometimes.<\/p>\n<p>Next, I made various other minor tweaks such as moving some warnings to debugs and cleaning up the codebase as suggested by my mentor Strangerke. Wanting to have some fun, I compiled ScummVM <em>with the CRAB engine<\/em> for my Android phone to check whether it would run and if yes, to what stage I could proceed. To my delight, it ran wonderfully &#8211; till stage 5 where it just crashed without any logs. \ud83d\ude42<\/p>\n<figure id=\"attachment_89\" aria-describedby=\"caption-attachment-89\" style=\"width: 580px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-89 size-large\" src=\"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1024x461.jpg\" alt=\"\" width=\"580\" height=\"261\" srcset=\"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1024x461.jpg 1024w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-300x135.jpg 300w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-768x346.jpg 768w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1536x691.jpg 1536w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-2048x922.jpg 2048w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1200x540.jpg 1200w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1980x891.jpg 1980w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption id=\"caption-attachment-89\" class=\"wp-caption-text\">Unrest running on Android 13<\/figcaption><\/figure>\n<p>Furthermore, I had a function stubbed out which made my saves unplayable. After un-stubbing the function and performing some little fixes, I tried again on my laptop and this time I made it all the way to the end!<\/p>\n<p>I did notice some small issues in my gameplay which I was able to fix eventually. There was this interesting graphical glitch in stage 5 where the layering was broken.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-89\" src=\"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1024x461.jpg\" alt=\"\" width=\"580\" height=\"261\" srcset=\"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1024x461.jpg 1024w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-300x135.jpg 300w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-768x346.jpg 768w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1536x691.jpg 1536w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-2048x922.jpg 2048w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1200x540.jpg 1200w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/img-1980x891.jpg 1980w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/p>\n<p>If you look at this screenshot again, the character is supposed to be in a room but instead, due to the broken layering, she appears <em>over <\/em>the wall. This was happening due to incorrect handling of &#8220;Autohide&#8221; layers, and once I fixed the mechanism, it worked perfectly.<\/p>\n<figure id=\"attachment_90\" aria-describedby=\"caption-attachment-90\" style=\"width: 580px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-90 size-large\" src=\"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image3-1024x612.png\" alt=\"\" width=\"580\" height=\"347\" srcset=\"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image3-1024x612.png 1024w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image3-300x179.png 300w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image3-768x459.png 768w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image3-1200x717.png 1200w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image3.png 1319w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption id=\"caption-attachment-90\" class=\"wp-caption-text\">The room is drawn correctly.<\/figcaption><\/figure>\n<p>Once you enter the room, these walls are supposed to simply disappear, so that you can see the characters in the room.<\/p>\n<figure id=\"attachment_91\" aria-describedby=\"caption-attachment-91\" style=\"width: 580px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-91\" src=\"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image4-1024x612.png\" alt=\"\" width=\"580\" height=\"347\" srcset=\"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image4-1024x612.png 1024w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image4-300x179.png 300w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image4-768x459.png 768w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image4-1200x717.png 1200w, https:\/\/blogs.scummvm.org\/hax0kartik\/wp-content\/uploads\/sites\/68\/2023\/08\/image4.png 1319w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption id=\"caption-attachment-91\" class=\"wp-caption-text\">Yay! Fixed \ud83d\ude42<\/figcaption><\/figure>\n<p>This is all that I achieved this week, and since the game is working without any crashes I decided to open a PR for merging my branch into the main branch. <a href=\"https:\/\/github.com\/scummvm\/scummvm\/pull\/5229\">PR #5229.<\/a> I should note that it might take a while for the PR to get merged, but once merged, you all should be able to play Unrest using ScummVM on your favourite devices.<\/p>\n<p>Thanks for reading!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi all, welcome back to my progress blog for CRAB. This week, I worked on finishing the audio and made many other minor changes to gear up for getting my fork merged into the main branch. The audio subsystem is fully in-place aside from the background music&#8217;s &#8220;fade-in&#8221; effect. You are able to set the [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/posts\/88\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/hax0kartik\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}