{"id":4294,"date":"2020-06-30T00:00:57","date_gmt":"2020-06-30T00:00:57","guid":{"rendered":"http:\/\/sycamore.mrwrightsclass.co.uk\/?page_id=4294"},"modified":"2021-07-13T07:19:03","modified_gmt":"2021-07-13T07:19:03","slug":"creating-clones","status":"publish","type":"page","link":"http:\/\/sycamore.mrwrightsclass.co.uk\/?page_id=4294","title":{"rendered":"Creating Clones"},"content":{"rendered":"\n<div class=\"wp-block-group has-background\" style=\"background-color:#ead8a1\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h3 class=\"wp-block-heading\">Today&#8217;s lesson will be a little more complicated. If you feel that you need more practice with previous skills, that is fine. Choose one of the games lessons on the right and have a go. If you want to create a different shooting game, or add to a previous game, then go for it. Just make sure that you send the game to us. If you are ready for more &#8230; carry on.<\/h3>\n\n\n\n<h3 class=\"has-very-dark-gray-color has-text-color wp-block-heading\"><span style=\"color:#ead8a1\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">This lesson will teach you how to clone a sprite. In other words, you can write code to create a copy of a sprite and write one piece of code, rather than copying the sprite lots of times yourself. It is how a game like space invaders is created &#8211; there are lots of space invaders on screen, but only really one sprite cloned (copied) lots of times.<\/h3>\n\n\n\n<h3 class=\"has-very-dark-gray-color has-text-color wp-block-heading\"><span style=\"color:#ead8a1\" class=\"has-inline-color\">.<\/span><\/h3>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<div class=\"wp-block-group has-very-dark-gray-color has-very-light-gray-background-color has-text-color has-background\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h3 class=\"wp-block-heading\">You are all at different stages with your coding. Today I have posted four videos. Some of you will skip the first and move through the other videos. Some of you will just get through the first one or two videos. Do what you feel is right for you&#8230;<\/h3>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"has-inline-color has-vivid-purple-color\">The first video<\/span> shows you how to create a sprite using a downloaded picture. I will download a picture of Darth Vader and create a sprite using the image.  A number of you know how to do this and so can skip the video.<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"614\" style=\"aspect-ratio: 1366 \/ 614;\" width=\"1366\" controls src=\"http:\/\/sycamore.mrwrightsclass.co.uk\/wp-content\/uploads\/2020\/06\/How-to-create-a-sprite.mp4\"><\/video><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"has-inline-color has-vivid-purple-color\">This second video<\/span> will show you how create a clone of a sprite. I am going to create a simple game where sprites (Darth Vader) whizz up the screen and you have to zap them by clicking on them. The object will be to zap as many as possible in 15 seconds. I will also have a good sprite (Ben Kenobi) that you must not zap &#8211; and if you do, the game will end. <span style=\"text-decoration: underline;\">Different versions of the sprite are different costumes, not different sprites<\/span>. So I only have one sprite &#8211; I have a Darth Vader costume, a Ben Kenobi costume and a &#8220;Zap&#8221; costume. You should watch the opening of the video and then create your costumes before moving on.<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"614\" style=\"aspect-ratio: 1366 \/ 614;\" width=\"1366\" controls src=\"http:\/\/sycamore.mrwrightsclass.co.uk\/wp-content\/uploads\/2020\/06\/Create-a-clone.mp4\"><\/video><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"has-inline-color has-vivid-purple-color\">This third video<\/span> will show you how write code to control what happens when a sprite is created<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"614\" style=\"aspect-ratio: 1366 \/ 614;\" width=\"1366\" controls src=\"http:\/\/sycamore.mrwrightsclass.co.uk\/wp-content\/uploads\/2020\/06\/Code-clone.mp4\"><\/video><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"has-inline-color has-vivid-purple-color\">The final video<\/span> will show you how to randomly switch costumes and write if statements so that different things happen when different costumes are clicked.<\/h3>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"614\" style=\"aspect-ratio: 1366 \/ 614;\" width=\"1366\" controls src=\"http:\/\/sycamore.mrwrightsclass.co.uk\/wp-content\/uploads\/2020\/06\/Randomise-costume.mp4\"><\/video><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">Remember &#8211; it is critical that you test your code every time that you change something. If it isn&#8217;t working, try to find the problem before moving on. If you don&#8217;t test your code regularly, it can become very difficult to identify errors&#8230;<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">If you get stuck, share your game by email, describe the problem and we&#8217;ll do our best to help.<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color:#ffffff\" class=\"has-inline-color\">.<\/span><\/h3>\n\n\n\n<h1 class=\"wp-block-heading\">Please share your games with us!<\/h1>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s lesson will be a little more complicated. If you feel that you need more practice with previous skills, that is fine. Choose one of the games lessons on the right and have a go. If you want to create a different shooting game, or add to a previous game, then go for it. Just &hellip; <a class=\"read-excerpt\" href=\"http:\/\/sycamore.mrwrightsclass.co.uk\/?page_id=4294\">Continue reading <span class=\"meta-nav\">&raquo;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":3843,"parent":1297,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4294","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/4294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4294"}],"version-history":[{"count":2,"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/4294\/revisions"}],"predecessor-version":[{"id":5115,"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/4294\/revisions\/5115"}],"up":[{"embeddable":true,"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/1297"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"http:\/\/sycamore.mrwrightsclass.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}