{"id":92,"date":"2024-07-28T14:32:09","date_gmt":"2024-07-28T14:32:09","guid":{"rendered":"https:\/\/blogs.scummvm.org\/markhor\/?p=92"},"modified":"2024-07-28T14:32:09","modified_gmt":"2024-07-28T14:32:09","slug":"freescape-engine-draci-engine-mads-engine-week-9","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/markhor\/2024\/07\/28\/freescape-engine-draci-engine-mads-engine-week-9\/","title":{"rendered":"Freescape Engine &amp; DRACI Engine &amp; MADS Engine &#8211; Week 9"},"content":{"rendered":"<h1>Freescape Engine<\/h1>\n<p>Few games in freescape engine have non interactive demos that auto play actions\/movement, so the issue with my PR was that the the demo shouldn&#8217;t allow any input while my method does allow the user to interact in demo.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-95\" src=\"https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185354.png\" alt=\"\" width=\"785\" height=\"138\" srcset=\"https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185354.png 785w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185354-300x53.png 300w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185354-768x135.png 768w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185354-720x127.png 720w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><br \/>\nSo my initial thought was that event.customType was being given value of 0xde00 when demo input was being generated and it was later checked while polling event, and if it had that value, it would continue and not allow user inputs to be processed. <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-96\" src=\"https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185234.png\" alt=\"\" width=\"1026\" height=\"390\" srcset=\"https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185234.png 1026w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185234-300x114.png 300w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185234-1024x389.png 1024w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185234-768x292.png 768w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-185234-720x274.png 720w\" sizes=\"auto, (max-width: 1026px) 100vw, 1026px\" \/><br \/>\nBut for some reason the statement else if (event.customType != 0xde00) is not being triggered so there is something else going on that I am unable to figure out hence I have halted my progress for this engine.<\/p>\n<h1>DRACI Engine<\/h1>\n<p>Draci Engine was another simple engine that did not need much effort and was done in one day<\/p>\n<p>Here is the <a href=\"https:\/\/github.com\/scummvm\/scummvm\/pull\/5965\" target=\"_blank\" rel=\"noopener\">PR<\/a>.<\/p>\n<h1>MADS Engine<\/h1>\n<p>Something unique for mads is that it stores the keys in stack then processes them somewhere else so I had to replicate that for custom actions.<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-97\" src=\"https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-192649.png\" alt=\"\" width=\"1550\" height=\"640\" srcset=\"https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-192649.png 1550w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-192649-300x124.png 300w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-192649-1024x423.png 1024w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-192649-768x317.png 768w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-192649-1536x634.png 1536w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-192649-720x297.png 720w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-192649-1440x595.png 1440w\" sizes=\"auto, (max-width: 1550px) 100vw, 1550px\" \/><\/p>\n<p>Another issue was that the keymap has an action to restart animation in main menu and it uses the &#8220;s&#8221; key, as there is a place in the game where user input is being taken so I had divide the keymap and turn it off when main menu is being shown, this took some time to figure out as I couldn&#8217;t find the best place to turn of the main menu keymap.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-98\" src=\"https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-193038.png\" alt=\"\" width=\"1544\" height=\"534\" srcset=\"https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-193038.png 1544w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-193038-300x104.png 300w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-193038-1024x354.png 1024w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-193038-768x266.png 768w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-193038-1536x531.png 1536w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-193038-720x249.png 720w, https:\/\/blogs.scummvm.org\/markhor\/wp-content\/uploads\/sites\/73\/2024\/07\/Screenshot-2024-07-28-193038-1440x498.png 1440w\" sizes=\"auto, (max-width: 1544px) 100vw, 1544px\" \/><\/p>\n<p>Here is the <a href=\"https:\/\/github.com\/scummvm\/scummvm\/pull\/5974\" target=\"_blank\" rel=\"noopener\">PR<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Freescape Engine Few games in freescape engine have non interactive demos that auto play actions\/movement, so the issue with my PR was that the the demo shouldn&#8217;t allow any input while my method does allow the user to interact in demo. So my initial thought was that event.customType was being given value of 0xde00 when [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-keymap"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":3,"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":99,"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/posts\/92\/revisions\/99"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/markhor\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}