{"id":49,"date":"2010-08-03T18:04:06","date_gmt":"2010-08-04T01:04:06","guid":{"rendered":"http:\/\/blogs.unsw.edu.au\/comp1400\/?p=49"},"modified":"2010-08-03T20:24:47","modified_gmt":"2010-08-04T03:24:47","slug":"lab-3","status":"publish","type":"post","link":"https:\/\/blogs.unsw.edu.au\/comp1400\/blog\/2010\/08\/lab-3\/","title":{"rendered":"Lab 3"},"content":{"rendered":"<p>In this lab you are going to make a very simple game. The player moves around in a 2D world gathering &#8216;treasures&#8217;. When each treasure is touched, it disappears.<br \/>\n<!--more--><\/p>\n<h2>Design<\/h2>\n<p>Before you begin programming, take some paper and draw a storyboard of what your game will look like. Make sure you show all the important events in the game:<\/p>\n<ol>\n<li>How does the player object move? What keys control it?<\/li>\n<li>How do treasures respond to the player? How will you tell if the player is touching them?<\/li>\n<\/ol>\n<h2>Prototype 1 &#8211; The Player<\/h2>\n<p>You first prototype is to make a model in the world and give it a script that allows the player to control its movement with the keyboard. How it moves it up to you to decide. You can use the <a href=\"http:\/\/www.cse.unsw.edu.au\/~cs1400\/lectures\/03b\/ShipControl.js\">script<\/a> from the Wednesday lecture as your starting place.<\/p>\n<h2>Prototype 2 &#8211; The Treasures<\/h2>\n<p>Add some treasure objects to the world. Add a script to them that makes them disappear if the player gets close.<\/p>\n<p>You can make a game object disappear by setting its <tt>active<\/tt> property to false:<\/p>\n<p><code>gameObject.active = false;<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lab you are going to make a very simple game. The player moves around in a 2D world gathering &#8216;treasures&#8217;. When each treasure is touched, it disappears.<\/p>\n","protected":false},"author":80,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[630],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-lab"],"_links":{"self":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/users\/80"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":4,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":52,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts\/49\/revisions\/52"}],"wp:attachment":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}