{"id":39,"date":"2009-08-04T19:31:16","date_gmt":"2009-08-04T17:31:16","guid":{"rendered":"https:\/\/blogs.scummvm.org\/dkasak\/?p=39"},"modified":"2022-04-15T19:36:51","modified_gmt":"2022-04-15T17:36:51","slug":"just-a-good-old-regular-update","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/dkasak\/2009\/08\/04\/just-a-good-old-regular-update\/","title":{"rendered":"Just a good old regular update"},"content":{"rendered":"<p>My work for this week was mainly concentrated on the main game loop and the bytecode interpreter.<\/p>\n<p>When implementing other parts of the engine, I tried following specifications and implementing the correct semantics, and not just transliterating the source code from the original engine. The main loop is much trickier to get right, however, as it is supposed to be re-entrant (luckily, only two levels deep) since some GPL commands expect to be able to call it to provide for interactivity while they execute (for instance, when playing animations). The original engine uses two loop status variables to distinguish between the various states of the loop and whether the current instance is a top-level loop or a nested one. It was my decision to mirror the original code for the loop much more closely because of that. (After GSOC, I\u2019ll look into writing some unit tests for the engine and then try to refactor away some of the nastiness in the design without completely breaking everything. Wish me luck on that.)<\/p>\n<p><!--more--><\/p>\n<p>Besides loop statuses, I also had to implement animation callbacks because the engine relies on the animations themselves to signal the nested loop to exit after they had played to the end. Several crucial GPL commands were also implemented (along with some library\/API refactoring to accommodate those). And of course, lots of bug fixes, some of them crucial for correct game logic. ?<\/p>\n<p>The result of this work is that the game now starts \u201cnaturally\u201d after the intro has played, characters can talk, rooms can be switched by clicking on exits and the game is interactive during animations. It also made headway for the things I\u2019m going to do this week, which leads us to\u2026<\/p>\n<p>This week I\u2019ll be concentrating my efforts on smoothing out some of the rough edges in the current code; some annoying, others more serious. The annoying ones are mostly minor bugs (like incorrect font colour in dialogues and incorrect placement of text), but hey, those have to be fixed too! The other, more serious, bug is that the main game loop can currently get called recursively more than two times if you click on things too many times before the animations have played through. This is the primary thing I have to fix before moving on so I can properly debug new problems as they arise.<\/p>\n<p>After I\u2019m done with that, I\u2019ll have some fun with two other major gameplay features \u2014 item handling and dialogues. After that, we\u2019ll have something that\u2019s dangerously close to playable *gasp*!<\/p>\n<p>Also, now that I\u2019ve proofread the post, I can see that I\u2019ve neglected to mention one thing: Robert and I agreed that I should probably leave proper walking with the dragon alone for now as it\u2019s not critical for the game to work and the original implementation is a bit convoluted. I\u2019ll get back to it once I\u2019m done with the more important stuff listed above.<\/p>\n<p>Stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My work for this week was mainly concentrated on the main game loop and the bytecode interpreter. When implementing other parts of the engine, I tried following specifications and implementing the correct semantics, and not just transliterating the source code from the original engine. The main loop is much trickier to get right, however, as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":41,"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/posts\/39\/revisions\/41"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/dkasak\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}