{"id":88,"date":"2026-08-31T16:34:16","date_gmt":"2026-08-31T16:34:16","guid":{"rendered":"https:\/\/robinclapworthy.com\/?p=88"},"modified":"2026-08-31T16:37:05","modified_gmt":"2026-08-31T16:37:05","slug":"made-a-ps4-controller-rumble-from-visual-foxpro","status":"publish","type":"post","link":"https:\/\/robinclapworthy.com\/?p=88","title":{"rendered":"Made a PS4 Controller Rumble From Visual FoxPro"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Visual FoxPro 9 was released in 2004.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The PlayStation 4 wasn&#8217;t released until 2013.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Naturally, I decided the two should talk to each other.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;d already managed to get controller input working in Galactic Gladiators using XInput, which meant I could move the player&#8217;s ship using a PS4 controller.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then I had another thought.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Could Visual FoxPro make the controller rumble?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There was only one sensible way to find out.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So I tried it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And, rather wonderfully, <strong>it worked.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the moment it&#8217;s very basic. I can make the controller vibrate, and I&#8217;ve proved that I can control the two rumble motors independently.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s about as far as I&#8217;ve taken it so far.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But proving it works immediately created a much bigger question:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What could I actually do with it?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The obvious answer is explosions, collisions and weapons. Fire something powerful and you feel it. Get hit and the controller reacts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But that feels like only the beginning.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Could a distant explosion produce a barely noticeable vibration?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Could a damaged engine make the controller occasionally shudder?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Could an approaching enemy be felt before it appears on screen?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Could a tractor beam or gravitational pull have its own characteristic vibration?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Could different kinds of damage actually <em>feel<\/em> different?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I don&#8217;t know yet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And that&#8217;s becoming one of my favourite things about this project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Quite often I start by wondering whether Visual FoxPro can do something at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then it works.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And that turns out to be the start of the problem. \ud83d\ude02<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Next step: turn basic rumble into something the game can actually use.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual FoxPro 9 was released in 2004. The PlayStation 4 wasn&#8217;t released until 2013. Naturally, I decided the two should talk to each other. I&#8217;d already managed to get controller input working in Galactic Gladiators using XInput, which meant I could move the player&#8217;s ship using a PS4 controller. Then I had another thought. Could &#8230; <a title=\"Made a PS4 Controller Rumble From Visual FoxPro\" class=\"read-more\" href=\"https:\/\/robinclapworthy.com\/?p=88\" aria-label=\"Read more about Made a PS4 Controller Rumble From Visual FoxPro\">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-88","post","type-post","status-publish","format-standard","hentry","category-galactic-gladiators"],"_links":{"self":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/88","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=88"}],"version-history":[{"count":1,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":89,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/88\/revisions\/89"}],"wp:attachment":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}