{"id":461,"date":"2019-06-13T11:46:24","date_gmt":"2019-06-13T18:46:24","guid":{"rendered":"http:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/?p=461"},"modified":"2022-06-27T02:37:18","modified_gmt":"2022-06-27T09:37:18","slug":"day-5-unit-2","status":"publish","type":"post","link":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/class\/day-5-unit-2\/","title":{"rendered":"Day 3 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<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">In this unit, we are building a platform game. We will use the concepts we learned last time, 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 In this unit, we are building a platform game. We will use the concepts we learned last time, events and if-then statements, but the game will be a little more complex. First we will start by watching this video. https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/platform-game\/platform-games-intro-and-design.html And open up the starter project. [&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_2022\/wp-json\/wp\/v2\/posts\/461","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=461"}],"version-history":[{"count":18,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/posts\/461\/revisions"}],"predecessor-version":[{"id":1275,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/posts\/461\/revisions\/1275"}],"wp:attachment":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/media?parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/categories?post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode_2022\/wp-json\/wp\/v2\/tags?post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}