{"id":227,"date":"2024-04-13T11:24:52","date_gmt":"2024-04-13T10:24:52","guid":{"rendered":"https:\/\/liambenstead.co.uk\/?p=227"},"modified":"2024-04-13T11:25:56","modified_gmt":"2024-04-13T10:25:56","slug":"space-shooter-project","status":"publish","type":"post","link":"https:\/\/liambenstead.co.uk\/?p=227","title":{"rendered":"Space Shooter Project"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/benstead-2020.hulldesign.co.uk\/wp-content\/uploads\/2020\/10\/Pixlr-Sprite-1024x626.png\" alt=\"\" class=\"wp-image-30\"\/><figcaption class=\"wp-element-caption\">I created some basic sprites in Pixlr using the appropriate sizes of 64&#215;64\/16&#215;32.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/benstead-2020.hulldesign.co.uk\/wp-content\/uploads\/2020\/10\/scr_PlayerMovement.png\" alt=\"\" class=\"wp-image-31\"\/><figcaption class=\"wp-element-caption\">I created a script called scr_PlayerMovement and typed in the correct code in order for my ship to strafe to the left or right.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/benstead-2020.hulldesign.co.uk\/wp-content\/uploads\/2020\/10\/Rigidbody2D.png\" alt=\"\" class=\"wp-image-32\"\/><figcaption class=\"wp-element-caption\">I had to add a Rigidbody 2D to the ships and enemies and change body type to kinematic. Box colliders are also important to the enemies as it enables the player to destroy them, vanishing from the screen completely.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/benstead-2020.hulldesign.co.uk\/wp-content\/uploads\/2020\/10\/scr_BulletBehaviour.png\" alt=\"\" class=\"wp-image-33\"\/><figcaption class=\"wp-element-caption\">In order for my ship to begin firing projectiles, I created a 2nd script called scr_BulletBehaviour and followed the steps. This is what it should should like in the final product. This will allow me to shoot a bullet from the player ship.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/benstead-2020.hulldesign.co.uk\/wp-content\/uploads\/2020\/10\/scr_EnemyBehaviour.png\" alt=\"\" class=\"wp-image-34\"\/><figcaption class=\"wp-element-caption\">I then created another script called scr_EnemyBehaviour and followed the required steps there.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/benstead-2020.hulldesign.co.uk\/wp-content\/uploads\/2020\/10\/Scene-View.png\" alt=\"\" class=\"wp-image-35\"\/><figcaption class=\"wp-element-caption\">In my Scene view, I had 5 ships slowly coming down to the player ship. This is a result of the 3rd script.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/benstead-2020.hulldesign.co.uk\/wp-content\/uploads\/2020\/10\/Hierarchy.png\" alt=\"\" class=\"wp-image-36\"\/><figcaption class=\"wp-element-caption\">This is what the Hierarchy looks like after I finished scripting. Notice how everything is a Prefab instead of a Sprite.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/benstead-2020.hulldesign.co.uk\/wp-content\/uploads\/2020\/10\/Game-View.png\" alt=\"\" class=\"wp-image-37\"\/><figcaption class=\"wp-element-caption\">This is what the game should run like now &#8211; all 5 enemy ships gradually descending down to the bottom of the screen. <\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-227","post","type-post","status-publish","format-standard","hentry","category-introduction-to-game-engines"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"liam\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/liambenstead.co.uk\/?p=227\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_GB\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Liam&#039;s Blog -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Space Shooter Project - Liam&#039;s Blog\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/liambenstead.co.uk\/?p=227\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-04-13T10:24:52+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-04-13T10:25:56+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Space Shooter Project - Liam&#039;s Blog\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227#blogposting\",\"name\":\"Space Shooter Project - Liam's Blog\",\"headline\":\"Space Shooter Project\",\"author\":{\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?author=1#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/benstead-2020.hulldesign.co.uk\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/Pixlr-Sprite-1024x626.png\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227\\\/#articleImage\"},\"datePublished\":\"2024-04-13T11:24:52+01:00\",\"dateModified\":\"2024-04-13T11:25:56+01:00\",\"inLanguage\":\"en-GB\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227#webpage\"},\"articleSection\":\"Introduction to Game Engines\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/liambenstead.co.uk\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=6#listItem\",\"name\":\"University Work\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=6#listItem\",\"position\":2,\"name\":\"University Work\",\"item\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=6\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=7#listItem\",\"name\":\"Year 1\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=7#listItem\",\"position\":3,\"name\":\"Year 1\",\"item\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=7\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=21#listItem\",\"name\":\"Introduction to Game Engines\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=6#listItem\",\"name\":\"University Work\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=21#listItem\",\"position\":4,\"name\":\"Introduction to Game Engines\",\"item\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=21\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227#listItem\",\"name\":\"Space Shooter Project\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=7#listItem\",\"name\":\"Year 1\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227#listItem\",\"position\":5,\"name\":\"Space Shooter Project\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?cat=21#listItem\",\"name\":\"Introduction to Game Engines\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/#organization\",\"name\":\"liambenstead.co.uk\",\"url\":\"https:\\\/\\\/liambenstead.co.uk\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?author=1#author\",\"url\":\"https:\\\/\\\/liambenstead.co.uk\\\/?author=1\",\"name\":\"liam\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e9bc261e6fb777f90267c81368d55804bc4fb5139af150e60fbe0b1eabfff22?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"liam\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227#webpage\",\"url\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227\",\"name\":\"Space Shooter Project - Liam's Blog\",\"inLanguage\":\"en-GB\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?p=227#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?author=1#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/?author=1#author\"},\"datePublished\":\"2024-04-13T11:24:52+01:00\",\"dateModified\":\"2024-04-13T11:25:56+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/#website\",\"url\":\"https:\\\/\\\/liambenstead.co.uk\\\/\",\"name\":\"liambenstead.co.uk\",\"inLanguage\":\"en-GB\",\"publisher\":{\"@id\":\"https:\\\/\\\/liambenstead.co.uk\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Space Shooter Project - Liam's Blog","description":"","canonical_url":"https:\/\/liambenstead.co.uk\/?p=227","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/liambenstead.co.uk\/?p=227#blogposting","name":"Space Shooter Project - Liam's Blog","headline":"Space Shooter Project","author":{"@id":"https:\/\/liambenstead.co.uk\/?author=1#author"},"publisher":{"@id":"https:\/\/liambenstead.co.uk\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/benstead-2020.hulldesign.co.uk\/wp-content\/uploads\/2020\/10\/Pixlr-Sprite-1024x626.png","@id":"https:\/\/liambenstead.co.uk\/?p=227\/#articleImage"},"datePublished":"2024-04-13T11:24:52+01:00","dateModified":"2024-04-13T11:25:56+01:00","inLanguage":"en-GB","mainEntityOfPage":{"@id":"https:\/\/liambenstead.co.uk\/?p=227#webpage"},"isPartOf":{"@id":"https:\/\/liambenstead.co.uk\/?p=227#webpage"},"articleSection":"Introduction to Game Engines"},{"@type":"BreadcrumbList","@id":"https:\/\/liambenstead.co.uk\/?p=227#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk#listItem","position":1,"name":"Home","item":"https:\/\/liambenstead.co.uk","nextItem":{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?cat=6#listItem","name":"University Work"}},{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?cat=6#listItem","position":2,"name":"University Work","item":"https:\/\/liambenstead.co.uk\/?cat=6","nextItem":{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?cat=7#listItem","name":"Year 1"},"previousItem":{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?cat=7#listItem","position":3,"name":"Year 1","item":"https:\/\/liambenstead.co.uk\/?cat=7","nextItem":{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?cat=21#listItem","name":"Introduction to Game Engines"},"previousItem":{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?cat=6#listItem","name":"University Work"}},{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?cat=21#listItem","position":4,"name":"Introduction to Game Engines","item":"https:\/\/liambenstead.co.uk\/?cat=21","nextItem":{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?p=227#listItem","name":"Space Shooter Project"},"previousItem":{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?cat=7#listItem","name":"Year 1"}},{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?p=227#listItem","position":5,"name":"Space Shooter Project","previousItem":{"@type":"ListItem","@id":"https:\/\/liambenstead.co.uk\/?cat=21#listItem","name":"Introduction to Game Engines"}}]},{"@type":"Organization","@id":"https:\/\/liambenstead.co.uk\/#organization","name":"liambenstead.co.uk","url":"https:\/\/liambenstead.co.uk\/"},{"@type":"Person","@id":"https:\/\/liambenstead.co.uk\/?author=1#author","url":"https:\/\/liambenstead.co.uk\/?author=1","name":"liam","image":{"@type":"ImageObject","@id":"https:\/\/liambenstead.co.uk\/?p=227#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/8e9bc261e6fb777f90267c81368d55804bc4fb5139af150e60fbe0b1eabfff22?s=96&d=mm&r=g","width":96,"height":96,"caption":"liam"}},{"@type":"WebPage","@id":"https:\/\/liambenstead.co.uk\/?p=227#webpage","url":"https:\/\/liambenstead.co.uk\/?p=227","name":"Space Shooter Project - Liam's Blog","inLanguage":"en-GB","isPartOf":{"@id":"https:\/\/liambenstead.co.uk\/#website"},"breadcrumb":{"@id":"https:\/\/liambenstead.co.uk\/?p=227#breadcrumblist"},"author":{"@id":"https:\/\/liambenstead.co.uk\/?author=1#author"},"creator":{"@id":"https:\/\/liambenstead.co.uk\/?author=1#author"},"datePublished":"2024-04-13T11:24:52+01:00","dateModified":"2024-04-13T11:25:56+01:00"},{"@type":"WebSite","@id":"https:\/\/liambenstead.co.uk\/#website","url":"https:\/\/liambenstead.co.uk\/","name":"liambenstead.co.uk","inLanguage":"en-GB","publisher":{"@id":"https:\/\/liambenstead.co.uk\/#organization"}}]},"og:locale":"en_GB","og:site_name":"Liam's Blog -","og:type":"article","og:title":"Space Shooter Project - Liam's Blog","og:url":"https:\/\/liambenstead.co.uk\/?p=227","article:published_time":"2024-04-13T10:24:52+00:00","article:modified_time":"2024-04-13T10:25:56+00:00","twitter:card":"summary_large_image","twitter:title":"Space Shooter Project - Liam's Blog"},"aioseo_meta_data":{"post_id":"227","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-04-13 10:24:53","updated":"2025-12-21 16:56:52","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/liambenstead.co.uk\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/liambenstead.co.uk\/?cat=6\" title=\"University Work\">University Work<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/liambenstead.co.uk\/?cat=7\" title=\"Year 1\">Year 1<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/liambenstead.co.uk\/?cat=21\" title=\"Introduction to Game Engines\">Introduction to Game Engines<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSpace Shooter Project\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/liambenstead.co.uk"},{"label":"University Work","link":"https:\/\/liambenstead.co.uk\/?cat=6"},{"label":"Year 1","link":"https:\/\/liambenstead.co.uk\/?cat=7"},{"label":"Introduction to Game Engines","link":"https:\/\/liambenstead.co.uk\/?cat=21"},{"label":"Space Shooter Project","link":"https:\/\/liambenstead.co.uk\/?p=227"}],"_links":{"self":[{"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=227"}],"version-history":[{"count":2,"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":230,"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions\/230"}],"wp:attachment":[{"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liambenstead.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}