{"id":577,"date":"2019-06-13T21:36:18","date_gmt":"2019-06-14T04:36:18","guid":{"rendered":"http:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/?p=577"},"modified":"2022-06-27T02:41:43","modified_gmt":"2022-06-27T09:41:43","slug":"day-7-unit-2","status":"publish","type":"post","link":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/class\/day-7-unit-2\/","title":{"rendered":"Day 4 Unit 3"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Unit 3. Quest Game.<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this unit, we will start building a role playing game or RPG. We will also learn about a special type of event called &#8220;Broadcast&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s watch the intro video together.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/quest-game\/introduction-to-the-quest-game.html\" target=\"_blank\">https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/quest-game\/introduction-to-the-quest-game.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We have three different startup projects you can choose from. They all contain characters that are already programmed to move based on the arrow keys that users press. <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/scratch.mit.edu\/projects\/70949040\/editor\" target=\"_blank\" rel=\"noreferrer noopener\">Starter Project 1<\/a><\/li><li><a href=\"https:\/\/scratch.mit.edu\/projects\/70949258\/editor\" target=\"_blank\" rel=\"noreferrer noopener\">Starter Project 2<\/a><\/li><li><a href=\"https:\/\/scratch.mit.edu\/projects\/70947766\/editor\" target=\"_blank\" rel=\"noreferrer noopener\">Starter Project 3<\/a><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We will first program the stage to change when the player enters an entrance, just like you see in many role playing games. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, you can use a trick to copy codes across sprites, instead of having to make the same code over and over again.  To copy code between sprites,&nbsp;click the code and drag it on top of each sprite.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Watch the video and program the different stages that players can go to. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/quest-game\/places-to-go.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/quest-game\/places-to-go.html<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Program the game to begin on the &#8220;town&#8221; backdrop.<\/li><li>For each entrance sprite:<ul><li>Program the backdrop to change<\/li><li>Hide all entrance sprites when the backdrop changes<\/li><li>Show all the entrances when the backdrop changes to &#8220;town&#8221;<\/li><\/ul><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we need to give the player a way back to where he was before, by giving him an &#8220;exit&#8221; option. When the player&#8217;s sprite enters a&nbsp;new location, the exit sprite will show. If the player&#8217;s sprite touches the exit sprite,&nbsp;the backdrop will change back to town.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In fact, you can code this part by just copying over the entrance code blocks from the entrance sprite to the exit sprite, and then tweaking them a little.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/quest-game\/add-an-exit.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/quest-game\/add-an-exit.html<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Copy the code from the house sprite to the exit sprite.<\/li><li>Exchange the &#8220;show&#8221; and &#8220;hide&#8221; blocks.<\/li><li>Change the &#8220;switch backdrop&#8221; value to &#8220;town.&#8221;<\/li><li>Remove the &#8220;broadcast&#8221; block.<\/li><li>Make the exit sprite change costumes depending on the backdrop using the &#8220;when backdrop switches&#8221; and &#8220;switch costume&#8221; blocks.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Now that we have set up the stages, we will continue tomorrow with the object for the quest. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before you go, don&#8217;t forget to finish your reflection survey!<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-2022-summer-code-camp wp-block-embed-2022-summer-code-camp\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"zthkxui4K3\"><a href=\"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/class\/day-7-survey\/\">Day 7 survey<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Day 7 survey&#8221; &#8212; 2022 summer code camp\" src=\"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/class\/day-7-survey\/embed\/#?secret=FGYMoGc114#?secret=zthkxui4K3\" data-secret=\"zthkxui4K3\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Unit 3. Quest Game. In this unit, we will start building a role playing game or RPG. We will also learn about a special type of event called &#8220;Broadcast&#8221;. Let&#8217;s watch the intro video together. https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/quest-game\/introduction-to-the-quest-game.html We have three different startup projects you can choose from. They all contain characters that are already programmed to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-577","post","type-post","status-publish","format-standard","hentry","category-class"],"_links":{"self":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/posts\/577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/comments?post=577"}],"version-history":[{"count":13,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/posts\/577\/revisions"}],"predecessor-version":[{"id":1280,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/posts\/577\/revisions\/1280"}],"wp:attachment":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/media?parent=577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/categories?post=577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/tags?post=577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}