{"id":108,"date":"2026-09-04T22:42:48","date_gmt":"2026-09-04T22:42:48","guid":{"rendered":"https:\/\/robinclapworthy.com\/?p=108"},"modified":"2026-09-04T22:42:49","modified_gmt":"2026-09-04T22:42:49","slug":"the-alien-now-arrives-through-a-portal","status":"publish","type":"post","link":"https:\/\/robinclapworthy.com\/?p=108","title":{"rendered":"The Alien Now Arrives Through a Portal"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">One of Tom\u2019s suggestions for Galactic Gladiators was that the alien shouldn\u2019t just suddenly appear on the screen. It should arrive through some sort of portal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the time, I had no idea how I was going to do that in Visual FoxPro.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then I created the particle effect for the player\u2019s explosion and realised I could use the same particles again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the explosion, all 80 particles start together and fly outwards. For the portal, they begin spread around a large circle and spiral inwards towards the point where the alien is going to appear.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the last particle reaches the centre, the alien appears and the screen gives a small shake.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It took a bit of sorting out because the old respawn code was making the alien visible before the portal had finished. For a while the alien appeared first and the portal seemed to arrive afterwards, which slightly defeated the point.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is fixed now.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The interesting bit is that the portal isn\u2019t an animation or a video. Visual FoxPro is calculating the position, speed and movement of every particle as the effect happens.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So the particle code that started life as one explosion has now become two completely different effects.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I think we may genuinely have the beginnings of a small game engine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Visual FoxPro.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I still can\u2019t quite believe I just wrote that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of Tom\u2019s suggestions for Galactic Gladiators was that the alien shouldn\u2019t just suddenly appear on the screen. It should arrive through some sort of portal. At the time, I had no idea how I was going to do that in Visual FoxPro. Then I created the particle effect for the player\u2019s explosion and realised &#8230; <a title=\"The Alien Now Arrives Through a Portal\" class=\"read-more\" href=\"https:\/\/robinclapworthy.com\/?p=108\" aria-label=\"Read more about The Alien Now Arrives Through a Portal\">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-108","post","type-post","status-publish","format-standard","hentry","category-galactic-gladiators"],"_links":{"self":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/108","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=108"}],"version-history":[{"count":1,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":109,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=\/wp\/v2\/posts\/108\/revisions\/109"}],"wp:attachment":[{"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinclapworthy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}