{"id":118,"date":"2025-08-04T04:36:45","date_gmt":"2025-08-04T04:36:45","guid":{"rendered":"https:\/\/blogs.scummvm.org\/ellen\/?p=118"},"modified":"2025-08-04T04:36:45","modified_gmt":"2025-08-04T04:36:45","slug":"week-9-scumm","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/ellen\/2025\/08\/04\/week-9-scumm\/","title":{"rendered":"Week 9: SCUMM"},"content":{"rendered":"<h5>Introduction<\/h5>\n<p>This week, I opened a PR for adding text-to-speech to SCUMM, which was an interesting engine to work on. I\u2019m quite happy with the result, though with the wide variety of games supported by SCUMM, it may need more work in the future.<\/p>\n<hr \/>\n<h5>SCUMM<\/h5>\n<p>Most of my week was spent on adding TTS to SCUMM, an engine that was neither especially difficult nor especially easy to work on. On one hand, SCUMM games are very similar to most of the games I\u2019ve worked on before. Most of them have few menus and rather simple means of displaying text, unlike engines like Efh or MM. Thus, creating a user-friendly TTS system was fairly easy for SCUMM. In addition, finding where text is displayed wasn&#8217;t difficult: most of it goes through <code>printString<\/code> and <code>drawString<\/code>, with actor speech being displayed with <code>displayDialog<\/code>. Furthermore, most of the GUI controls and buttons come with labels built into them, which makes voicing buttons when they\u2019re hovered over a very simple process. As such, much of the work for SCUMM involved simply adding TTS voicing calls to these functions, while accounting for situations such as subtitles for voiced dialog and the need to delay the disappearance of text until TTS is finished.<\/p>\n<p>On the other hand, however, SCUMM is larger than some of the engines I\u2019ve worked with previously, and it supports many different games. This means that compatibility issues are a recurring problem, as what works for TTS in one version of the SCUMM engine may not work in others. A good example of this is <code>verbMouseOver<\/code>. When I first came across this method, I thought that it would be a great place to voice verbs when they&#8217;re hovered over. However, SCUMM version 5 &#8211; or at least, Indiana Jones and the Fate of Atlantis &#8211; doesn\u2019t seem to reliably use this function for detection of hovering over verbs. In addition, while some games only call <code>drawVerb<\/code> once as a verb is hovered over, games like Fate of Atlantis call it every frame. Thus, to try to voice verbs as robustly as possible, I decided to add code to <code>drawVerb<\/code>, which most SCUMM versions seem to go through for verb drawing, to check whether the current verb is highlighted before voicing it, a strategy that seemed to work for many games. There were other compatibility issues that I had to resolve as well, such as SCUMM versions 0, 1, and 2 using custom text encodings that needed to be replicated; <code>drawVerb<\/code> sometimes being used to print strings that aren\u2019t verbs, requiring them to be voiced even if they aren\u2019t highlighted; and Passport to Adventure having a special help menu with buttons that aren\u2019t considered GUI controls, which required a means of storing the text for each button and detecting when they&#8217;re hovered over.<\/p>\n<p>Another concern was that SCUMM versions 7 and 8 use their own methods for displaying text, though they were fortunately similar enough to those used by earlier versions that it wasn\u2019t too difficult to voice them. Humongous Entertainment games also seem to have different means of handling text, but because they don&#8217;t have much text in the first place, I didn&#8217;t have to worry as much about them. Thus, most of the compatibility issues were in earlier SCUMM versions, with later ones having fewer problems.<\/p>\n<p>Ultimately, the most difficult component of SCUMM was the wide variety of games supported. Each version has its own ways of handling text that have to be considered, requiring careful thought about the best places to voice or stop text. I\u2019m fairly happy with my implementation of TTS for this engine, but because of its many games, there may be some oddities that will need to be resolved.<\/p>\n<hr \/>\n<h5>Conclusion<\/h5>\n<p>I opened a PR for SCUMM this week, which was an interesting engine to explore, due to its greater size and variety of versions. I also revisited my MADE PR, an engine that had its own compatibility issues, with text indices varying across game versions, that should be solved now. Next week, I\u2019ll be working on AGI, the last engine listed on my project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This week, I opened a PR for adding text-to-speech to SCUMM, which was an interesting engine to work on. I\u2019m quite happy with the result, though with the wide variety of games supported by SCUMM, it may need more work in the future. SCUMM Most of my week was spent on adding TTS to [&hellip;]<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/comments?post=118"}],"version-history":[{"count":13,"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":131,"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/posts\/118\/revisions\/131"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/media?parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/categories?post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ellen\/wp-json\/wp\/v2\/tags?post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}