{"id":35,"date":"2025-06-30T14:59:27","date_gmt":"2025-06-30T14:59:27","guid":{"rendered":"https:\/\/blogs.scummvm.org\/prime\/?p=35"},"modified":"2025-06-30T15:01:54","modified_gmt":"2025-06-30T15:01:54","slug":"week-4-sword25-teenagent-and-ngi","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/prime\/2025\/06\/30\/week-4-sword25-teenagent-and-ngi\/","title":{"rendered":"Week 4: Sword25, TeenAgent and NGI"},"content":{"rendered":"<p data-start=\"172\" data-end=\"492\">This week, I focused on bringing keymapper support to three engines: <strong data-start=\"176\" data-end=\"187\">Sword25<\/strong>, <strong data-start=\"189\" data-end=\"202\">Teenagent<\/strong>, and <strong data-start=\"208\" data-end=\"215\">NGI<\/strong>. Each had its own quirks, but none were too complex\u2014so I was able to make steady progress across the board.<\/p>\n<hr data-start=\"716\" data-end=\"719\" \/>\n<h3 data-start=\"721\" data-end=\"755\">Sword25<\/h3>\n<p data-start=\"757\" data-end=\"899\">The Sword25 engine uses script-driven input handling. That made things straightforward\u2014no refactoring needed.<\/p>\n<p data-start=\"901\" data-end=\"1136\">My job here was mostly investigative: figure out what each key does and document it for the keymapper. Since input behavior was defined in scripts, I didn\u2019t need to touch much engine-level code. The entire process was smooth and quick.<\/p>\n<hr data-start=\"1138\" data-end=\"1141\" \/>\n<h3 data-start=\"1143\" data-end=\"1173\">Teenagent<\/h3>\n<p data-start=\"1175\" data-end=\"1456\">Teenagent was also fairly simple. It involved defining a few custom actions for specific keys and setting up mouse input. The engine doesn\u2019t have complex input modes or conditionally processed input, so once I identified the key behaviors, wiring up the keymapper didn\u2019t take long.<\/p>\n<hr data-start=\"1458\" data-end=\"1461\" \/>\n<h3 data-start=\"1463\" data-end=\"1497\">NGI<\/h3>\n<p data-start=\"1499\" data-end=\"1694\">The NGI engine was the most challenging of the three this week. While it didn\u2019t introduce any new types of problems, it <em data-start=\"1619\" data-end=\"1624\">did<\/em> have more keys and more complexity around <em data-start=\"1667\" data-end=\"1674\">where<\/em> input is processed.<\/p>\n<p data-start=\"1696\" data-end=\"1864\">One big issue: keys pressed during menus, modals, or intros weren\u2019t processed through the same input flow as in-game actions. That meant keymapper actions would either:<\/p>\n<ul data-start=\"1865\" data-end=\"1953\">\n<li data-start=\"1865\" data-end=\"1908\">\n<p data-start=\"1867\" data-end=\"1908\">Be ignored in certain contexts, or worse\u2026<\/p>\n<\/li>\n<li data-start=\"1909\" data-end=\"1953\">\n<p data-start=\"1911\" data-end=\"1953\">Be interpreted in places they shouldn&#8217;t be<\/p>\n<\/li>\n<\/ul>\n<p data-start=\"1955\" data-end=\"2193\">To fix this, I had to carefully trace the engine\u2019s input handling paths and add logic to <strong data-start=\"2044\" data-end=\"2079\">enable or disable the keymapper<\/strong> at the right times. Most of my time on NGI was spent understanding those flows and placing the toggles precisely.<\/p>\n<p data-start=\"2195\" data-end=\"2293\">Once that was in place, implementing custom actions and mapping key behaviors was straightforward.<\/p>\n<hr data-start=\"2295\" data-end=\"2298\" \/>\n<h3 data-start=\"2300\" data-end=\"2311\">Wrap-Up<\/h3>\n<p data-start=\"2313\" data-end=\"2326\">This week, I:<\/p>\n<ul>\n<li data-start=\"2328\" data-end=\"2501\">Implemented keymapper support for <strong data-start=\"2365\" data-end=\"2376\">Sword25<\/strong>, <strong data-start=\"2378\" data-end=\"2391\">Teenagent<\/strong>, and <strong data-start=\"2397\" data-end=\"2404\">NGI<\/strong><\/li>\n<li data-start=\"2328\" data-end=\"2501\">Got the NGI keymapper PR merged<\/li>\n<li data-start=\"2328\" data-end=\"2501\">Got the keymapper action label normalization PR merged<\/li>\n<\/ul>\n<p data-start=\"2503\" data-end=\"2698\">Next week, I\u2019ll continue this momentum and explore new engines.<\/p>\n<p data-start=\"2705\" data-end=\"2794\" data-is-last-node=\"\" data-is-only-node=\"\">\n","protected":false},"excerpt":{"rendered":"<p>This week, I focused on bringing keymapper support to three engines: Sword25, Teenagent, and NGI. Each had its own quirks, but none were too complex\u2014so I was able to make steady progress across the board. Sword25 The Sword25 engine uses script-driven input handling. That made things straightforward\u2014no refactoring needed. My job here was mostly investigative: [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-35","post","type-post","status-publish","format-standard","hentry","category-week-4"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/comments?post=35"}],"version-history":[{"count":6,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":41,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/posts\/35\/revisions\/41"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/media?parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/categories?post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/tags?post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}