{"id":98,"date":"2026-09-04T18:43:52","date_gmt":"2026-09-04T18:43:52","guid":{"rendered":"https:\/\/robinclapworthy.com\/?p=98"},"modified":"2026-09-04T18:57:47","modified_gmt":"2026-09-04T18:57:47","slug":"making-foxpro-shake","status":"publish","type":"post","link":"https:\/\/robinclapworthy.com\/?p=98","title":{"rendered":"Making FoxPro Shake"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The latest slightly ridiculous experiment in Galactic Gladiators is screen shake.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the player\u2019s ship is hit, the whole game moves around by a few pixels before returning to where it started.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is actually quite a subtle effect, but once it is there you can definitely feel the difference. The collision suddenly has a bit more weight to it\u2014especially when it is combined with the explosion sound and the controller rumbling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As usual, the effect is quite simple once you know how it works. FoxPro remembers the original position of the game window, moves it randomly around that position for a few frames, and then puts it back exactly where it was.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The important bit is remembering the original position. Otherwise, each random movement could be based on the last one and the game would slowly wander off across the desktop.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I can now use different amounts of shake for different things. A shield hit can cause a small tremor, while the player\u2019s ship exploding can shake everything much more violently.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next idea is to combine it with the huge particle explosion from the old Defender arcade game.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That might be the next proper \u201cwait\u2026 this is FoxPro?\u201d moment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For now, though, I have made Visual FoxPro shake\u2014and that has amused me far more than it probably should.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The latest slightly ridiculous experiment in Galactic Gladiators is screen shake. When the player\u2019s ship is hit, the whole game moves around by a few pixels before returning to where it started. It is actually quite a subtle effect, but once it is there you can definitely feel the difference. The collision suddenly has a &#8230; <a title=\"Making FoxPro Shake\" class=\"read-more\" href=\"https:\/\/robinclapworthy.com\/?p=98\" aria-label=\"Read more about Making FoxPro Shake\">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-98","post","type-post","status-publish","format-standard","hentry","category-galactic-gladiators"],"_links":{"self":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/98","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=98"}],"version-history":[{"count":1,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/98\/revisions"}],"predecessor-version":[{"id":99,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/98\/revisions\/99"}],"wp:attachment":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}