{"id":51,"date":"2021-11-04T04:05:03","date_gmt":"2021-11-04T04:05:03","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/?p=51"},"modified":"2021-11-04T04:05:03","modified_gmt":"2021-11-04T04:05:03","slug":"new-map-who-dis","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/2021\/11\/04\/new-map-who-dis\/","title":{"rendered":"New Map, Who Dis?"},"content":{"rendered":"\n<p>We finished our prototype game this week and turned it in for the project midpoint archive.&nbsp; It contained all the basic elements working together including:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The first map<\/li><li>The player-controlled base turret with two ammunition types<\/li><li>Two different kinds of animated enemies that enter in waves<\/li><li>An interactive UI<\/li><li>Plus a title and end scene<\/li><\/ul>\n\n\n\n<p>I\u2019m proud of what we\u2019ve accomplished so far and excited for what\u2019s to come.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Map 2: Arctic Beach<\/h2>\n\n\n\n<p>This week I worked on the second map for our game.\u00a0 Hard-coding the paths for my first map proved to be rather tedious for my teammates.\u00a0 So I hoped there was something I could do to make this process easier the second time around.\u00a0 I remembered hearing in <a href=\"https:\/\/www.youtube.com\/watch?v=mJZQabPyTHo\" target=\"_blank\" rel=\"noreferrer noopener\">one of the Tiled map editor tutorials<\/a> that you could draw out paths as objects, embed them in map, access them in Phaser, then program enemies to move along those paths.<\/p>\n\n\n\n<p>Unfortunately, the narrator doesn\u2019t actually explain how to do this.\u00a0 After reviewing the videos and Phaser documentation (not to mention a substantial amount of googling) I did learn how to drop named points as objects in the map and reference them in Phaser. But getting a sprite to follow a line object and animate correctly was just beyond my reach.\u00a0<\/p>\n\n\n\n<p>Instead, I kicked curves to the curb and just made a map with straight lines.\u00a0 At least it includes point objects at path vertices to make the hard-coding way easier.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"595\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/Screenshot-2021-11-03-190249-1024x595.png\" alt=\"\" class=\"wp-image-52\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/Screenshot-2021-11-03-190249-1024x595.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/Screenshot-2021-11-03-190249-300x174.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/Screenshot-2021-11-03-190249-768x447.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/Screenshot-2021-11-03-190249-1536x893.png 1536w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/Screenshot-2021-11-03-190249.png 1978w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Map 2 in tiled with embedded point objects. The UI is omitted here but still shows up in the game.<\/figcaption><\/figure>\n\n\n\n<p>I also started writing the framework to transition between levels in the game.\u00a0 Now it can load the appropriate map, reset game values at the beginning of a level, display the current level on the screen, and still transition to the title or game over scene at the appropriate time. The enemies on level two still follow the paths from the first map, but we\u2019ll fix this when we configure the new paths.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"564\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/map02-wrong-paths-1-1024x564.png\" alt=\"\" class=\"wp-image-54\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/map02-wrong-paths-1-1024x564.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/map02-wrong-paths-1-300x165.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/map02-wrong-paths-1-768x423.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/map02-wrong-paths-1-1536x846.png 1536w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/4705\/files\/2021\/11\/map02-wrong-paths-1-2048x1128.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Hmm&#8230; that looks wrong<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We finished our prototype game this week and turned it in for the project midpoint archive.&nbsp; It contained all the basic elements working together including: The first map The player-controlled base turret with two ammunition types Two different kinds of animated enemies that enter in waves An interactive UI Plus a title and end scene &hellip; <a href=\"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/2021\/11\/04\/new-map-who-dis\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">New Map, Who Dis?<\/span><\/a><\/p>\n","protected":false},"author":11576,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/users\/11576"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":55,"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/posts\/51\/revisions\/55"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/selfisnotdefined\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}