{"id":461,"date":"2019-06-13T11:46:24","date_gmt":"2019-06-13T18:46:24","guid":{"rendered":"http:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/?p=461"},"modified":"2021-06-28T11:00:57","modified_gmt":"2021-06-28T18:00:57","slug":"day-5-unit-2","status":"publish","type":"post","link":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/class\/day-5-unit-2\/","title":{"rendered":"Day 5 Unit 2"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Unit 2. Platform game &#8211; events and If-then statements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before we start with a new game, let&#8217;s share and show the games that you have worked on last week.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/music-and-sound\/introduction-and-discovery\/wrap-up-share-your-project.html\" target=\"_blank\" rel=\"noreferrer noopener\">Wrap up: Share your project!<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Click&nbsp;<strong>Share<\/strong>&nbsp;button on the top of the page.<\/li><li>Click on&nbsp;<strong>+add to studio&nbsp;<\/strong>button at the bottom of the page<\/li><li>Choose&nbsp;<strong>2021 Race and Maze games.<\/strong><\/li><li>Click okay<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Wrap-up: Show your project<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>click on your account name at the top right of the page.<\/li><li>Select&nbsp;<strong>My Class<\/strong><\/li><li>Click on Class Studios \u2013&nbsp;<strong>2021 Race and Maze games<\/strong><\/li><li>Check out your friends projects!<\/li><\/ol>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Today, we are building a platform game. We will use the concepts we learned last week, events and if-then statements, but the game will be a little more complex. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First we will start by watching this video. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/platform-game\/platform-games-intro-and-design.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/platform-game\/platform-games-intro-and-design.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And open up the starter project. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"http:\/\/scratch.mit.edu\/projects\/19646592\/#editor\" target=\"_blank\">http:\/\/scratch.mit.edu\/projects\/19646592\/#editor<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We will use events to make the sprite jump.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/platform-game\/use-events-to-make-the-sprite-jump.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/platform-game\/use-events-to-make-the-sprite-jump.html<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Program your player sprite to jump when the up arrow key is pressed.<\/li><li>Create a condition that says if the sprite is not touching a platform, then it should move down.<\/li><li>Make the player sprite fall when it is not touching a platform.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Then we will make the sprite move left and right when the arrow keys are pressed. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/platform-game\/move-the-sprite-left-and-right.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/platform-game\/move-the-sprite-left-and-right.html<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create two key-press events.<\/li><li>Add two &#8220;change x by&#8221; blocks to make the sprite move both left and right.<\/li><li>Add two &#8220;repeat until&#8221; blocks to make the sprite move more smoothly.<\/li><li>For each &#8220;repeat until&#8221; block, create a condition that makes the sprite move until the key is not pressed.<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Unit 2. Platform game &#8211; events and If-then statements Before we start with a new game, let&#8217;s share and show the games that you have worked on last week. Wrap up: Share your project! Click&nbsp;Share&nbsp;button on the top of the page. Click on&nbsp;+add to studio&nbsp;button at the bottom of the page Choose&nbsp;2021 Race and Maze [&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-461","post","type-post","status-publish","format-standard","hentry","category-class"],"_links":{"self":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/posts\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/comments?post=461"}],"version-history":[{"count":12,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/posts\/461\/revisions"}],"predecessor-version":[{"id":1099,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/posts\/461\/revisions\/1099"}],"wp:attachment":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/media?parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/categories?post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2021\/wp-json\/wp\/v2\/tags?post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}