{"id":260,"date":"2026-10-28T22:24:04","date_gmt":"2026-10-28T22:24:04","guid":{"rendered":"https:\/\/robinclapworthy.com\/?p=260"},"modified":"2026-10-28T22:26:15","modified_gmt":"2026-10-28T22:26:15","slug":"the-case-of-the-disappearing-subtitles","status":"publish","type":"post","link":"https:\/\/robinclapworthy.com\/?p=260","title":{"rendered":"The Case of the Disappearing Subtitles"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>How a small rendering bug made a surprisingly big difference to Galactic Gladiators.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes the biggest improvements to a game don&#8217;t come from adding new features. They come from fixing something that&#8217;s been broken for ages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For quite some time, the subtitles in Galactic Gladiators have been behaving rather strangely.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They&#8217;d appear for a split second and then vanish.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;d assumed there was something wrong with the timing. Perhaps the subtitle counter was being reset, or another routine was hiding the text prematurely.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But during a recent debugging session, something interesting happened.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I put a breakpoint in the routine responsible for hiding subtitles. The text appeared, promptly disappeared, and then&#8230; nothing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The debugger didn&#8217;t stop until about seven seconds later.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Which was exactly when the subtitle was supposed to disappear.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The timer wasn&#8217;t broken at all.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The subtitle was still there. Visual FoxPro thought it was visible. Its caption was correct. Its countdown was working perfectly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It just wasn&#8217;t being drawn on the screen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Culprit<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Galactic Gladiators uses a custom graphics engine written in Visual FoxPro 9, with GDI+ and buffered rendering.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rather than drawing everything directly to the screen, the game builds each frame in memory before displaying the completed image.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This makes the animation considerably smoother.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unfortunately, the final battle&#8217;s renderer was also painting straight over my perfectly innocent Visual FoxPro subtitle label.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The subtitle hadn&#8217;t disappeared. It had been buried beneath the graphics.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Fix<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Initially, I tried bringing the label to the front and refreshing it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No luck.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The eventual solution was surprisingly straightforward: draw the subtitles directly into the same graphics buffer as the rest of the game.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now the subtitles are part of the completed frame, rather than separate controls fighting for screen space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And suddenly, dialogue that had been practically invisible for months started appearing properly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">An Unexpected Improvement<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s the interesting part.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;d spent a lot of time giving BARF, the game&#8217;s resident alien, things to say.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Little observations, warnings, jokes and reactions to what&#8217;s happening around him.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But because the subtitles were disappearing, much of that personality simply wasn&#8217;t reaching the player.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now it is.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And the difference is remarkable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The game immediately feels more alive. There&#8217;s more humour, more context and more character.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All without writing a single new joke.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m now extending the subtitle system so different characters can have their own identities.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">BARF will have his usual excitable personality, while the ship&#8217;s computer will be considerably calmer, more precise and rather dry.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The two aren&#8217;t necessarily going to get along.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At least, not initially.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Eventually, they&#8217;ll have their own voices too.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But that&#8217;s another story.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For now, I&#8217;ve learned something rather useful:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Sometimes the feature you&#8217;ve been looking for is already there. You just can&#8217;t see it.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Galactic Gladiators \u2014 built in Visual FoxPro 9, because apparently nobody told me I couldn&#8217;t.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How a small rendering bug made a surprisingly big difference to Galactic Gladiators. Sometimes the biggest improvements to a game don&#8217;t come from adding new features. They come from fixing something that&#8217;s been broken for ages. For quite some time, the subtitles in Galactic Gladiators have been behaving rather strangely. They&#8217;d appear for a split &#8230; <a title=\"The Case of the Disappearing Subtitles\" class=\"read-more\" href=\"https:\/\/robinclapworthy.com\/?p=260\" aria-label=\"Read more about The Case of the Disappearing Subtitles\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-260","post","type-post","status-publish","format-standard","hentry","category-galactic-gladiators"],"_links":{"self":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=260"}],"version-history":[{"count":2,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions"}],"predecessor-version":[{"id":263,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions\/263"}],"wp:attachment":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}