{"id":9,"date":"2023-09-06T16:19:47","date_gmt":"2023-09-06T16:19:47","guid":{"rendered":"https:\/\/courses.etc.cmu.edu\/53-341\/?page_id=9"},"modified":"2023-10-16T16:16:11","modified_gmt":"2023-10-16T16:16:11","slug":"unity-tutorials","status":"publish","type":"page","link":"https:\/\/courses.etc.cmu.edu\/53-341\/?page_id=9","title":{"rendered":"Unity Tutorials"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Here you can find the Unity Tutorials used in our classes.   Keep this page bookmarked as these will be updated regularly with new content as it is released.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Breakout Lessons<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In these lessons we take an introductory look into Unity and develop a simple game of &#8220;Breakout&#8221; using the systems we have.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Part 1: Unity Basics<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/youtu.be\/ToMtgKzLFg8\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/ToMtgKzLFg8\"><strong>Lesson 1: Layout<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/uR1__b7kWMY\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/uR1__b7kWMY\"><strong>Lesson 2: Physics Basics<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/fCZ6thvcrnM\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/fCZ6thvcrnM\"><strong>Lesson 3: Input Basics<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/0dFnnPzkE3I\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/0dFnnPzkE3I\"><strong>Lesson 4: Collision Basics<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/BXczpgH6lpU\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/BXczpgH6lpU\"><strong>Lesson 5: Scoring Basics<\/strong><\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Part 2: Software Patterns and Strategies<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/youtu.be\/G0ldNTtPB7c\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/G0ldNTtPB7c\"><strong>Lesson 1: Patterns &#8211; Observer, Component, and Singleton<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/ZkR06PYc9GI\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/ZkR06PYc9GI\"><strong>Lesson 2: State Machine Basics<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/6UL5v16KN9w\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/6UL5v16KN9w\"><strong>Lesson 3: State Transitions<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/Z5rhAPKEhlg\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/Z5rhAPKEhlg\"><strong>Lesson 4: Coroutines<\/strong><\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Arcade Lessons<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In these lessons, we examine various methods of common game features using some classic arcade games as our inspiration. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A template Unity Project with pre-defined levels is available for download <a href=\"https:\/\/cmu.box.com\/s\/o87jtainzpbzv7jv25ms6vtnt30hh78r\" data-type=\"link\" data-id=\"https:\/\/cmu.box.com\/s\/o87jtainzpbzv7jv25ms6vtnt30hh78r\">here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" href=\"https:\/\/youtu.be\/FV4fH_bs7zw\" target=\"_blank\"><strong>Part 0: Introduction<\/strong><\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Part 1: Player Movement<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/youtu.be\/3wKVxz4lrCI\" target=\"_blank\" rel=\"noreferrer noopener\">Lesson 1: Spacey Guys<\/a> <\/strong>(&#8220;Space Invaders&#8221;-style shooter)<br>Simple Movement with movement vectors, Input.GetAxis( ), Time.deltaTime, and Mathf.Clamp( ) to keep us in play.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youtu.be\/9HTJqcVqPOc\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/9HTJqcVqPOc\" target=\"_blank\" rel=\"noreferrer noopener\">Lesson 2: Galaxy Guys<\/a><\/strong> (&#8220;Galaga&#8221;-style shooter)<br>Similar mechanics to Lesson 1, but with an additional axis and magnitude clamping.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youtu.be\/9cubTcqNj-8\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/9cubTcqNj-8\" target=\"_blank\" rel=\"noreferrer noopener\">Lesson 3: Meteoroids <\/a><\/strong>(&#8220;Asteroids&#8221;-style space shooter)<br>The Rigidbody component moves our player ship through the use of applied forces &amp; torque<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youtu.be\/L409Ek4oiZY\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/L409Ek4oiZY\" target=\"_blank\" rel=\"noreferrer noopener\">Lesson 4: Pellet Guy<\/a><\/strong> (&#8220;Pac-Man&#8221;-style top-down maze game)<br>Tilemap Colliders provide the constraints to manage the motion of our player character&#8217;s Rigidbody<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youtu.be\/-06W-llFl_4\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/-06W-llFl_4\" target=\"_blank\" rel=\"noreferrer noopener\">Lesson 5: Highway Frog<\/a><\/strong> (&#8220;Frogger&#8221;-style top-down highway amphibian jumper)<br>Grid-based movement uses a second transform target, while MoveToward( ) generates a timed jump by limiting our distance-per-frame.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Part 2: Enemy Movement<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/youtu.be\/TAL0bQwNukg\">Lesson 1: Meteoroids<br><\/a><\/strong>Simple Rigidbody2D physics are used to manage our debris field, and simple forces are applied to push [Rigidbody2D.AddForce()] and spin [Rigidbody2D.AddTorque] to our meteoroids.  We also look at using Instantiate() to generate &#8220;smaller&#8221; chunks when we destroy larger objects.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youtu.be\/mwdEMBpk1gk\">Lesson 2: Highway Frog<br><\/a><\/strong>We look at strategies to create an enemy &#8220;spawning&#8221; system to generate lanes of traffic.  Our script allows us to adjust and set the vehicle direction, speed, pacing, and randomize our frequency.<\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/haF4l034j8s\"><strong>Lesson 3: Spacey Guys<br><\/strong><\/a>These enemies are a well organized force, taking direction only from their coordinating Mother Ship.  We look at how &#8220;inheritance&#8221; can be used to generate synchronized movement (hint: we only move the parent object).  We also look at accessing child counts through the Transform of an object, and how we can use that to randomize within a set.<\/li>\n\n\n\n<li>Lesson 4: Galaxy Guys (coming soon)<\/li>\n\n\n\n<li>Lesson 5: Pelley Guy (coming soon)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Platform Games<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Part 1: Motion Controls<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/youtu.be\/-bCQS481ZBo\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/-bCQS481ZBo\"><strong>Lesson 1: Top-Down Controller<\/strong><br><\/a>True, this isn&#8217;t what we would use for a platform game, but as long as we are looking at 2D movement, let&#8217;s start small and move our way up.<\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/NqoDYlYJz7w\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/NqoDYlYJz7w\"><strong>Lesson 2: Side Scroller Controller<\/strong><br><\/a>Sadly, Unity does not come with a built-in character controller for 2D, so we are going to make our own by adapting a simple controller we find online.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Part 2: Sprites &amp; Animation<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/youtu.be\/lawAfZsnrpU\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/lawAfZsnrpU\">Lesson 1: Sprite Basics<br><\/a><\/strong>We are going to take a slightly more involved look at our sprites, and how they operate.  Sprite Rendering has some subtle difference from Mesh Rendering, the most important of which is the Sorting Layer.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youtu.be\/AMXtFvetVFw\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/AMXtFvetVFw\">Lesson 2: Tilemaps<br><\/a><\/strong>Tilemaps are an effective and efficient way to design game levels quickly.  Just set up your sprite tiles and paint your world!<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youtu.be\/uiE90OQ_KQo\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/uiE90OQ_KQo\">Lesson 3: Player Animation<br><\/a><\/strong>The sprite renderer also exposes the ability to swap out our sprites sequentially to create animation effects.  We look at using the Animator and Animation system to set up a finite state engine for our animation clips<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Part 3: Collisions &amp; Attacks<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/youtu.be\/lEp1LEk6wuk\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/lEp1LEk6wuk\"><strong>Lesson 1: Player Controller Collisions<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/AMXtFvetVFw\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/AMXtFvetVFw\"><strong>Lesson 2: Stomp Attacks<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/F3yL8roOECM\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/F3yL8roOECM\"><strong>Lesson 3: Melee Attacks<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/fj3SNopleeI\" data-type=\"link\" data-id=\"https:\/\/youtu.be\/fj3SNopleeI\"><strong>Lesson 4: Fireball Attacks<\/strong><\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Here you can find the Unity Tutorials used in our classes. Keep this page bookmarked as these will be updated regularly with new content as it is released. Breakout Lessons In these lessons we take an introductory look into Unity and develop a simple game of &#8220;Breakout&#8221; using the systems we have. Part 1: Unity [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-9","page","type-page","status-publish","hentry"],"blocksy_meta":"","featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"post_excerpt_stackable":"<p>Here you can find the Unity Tutorials used in our classes. Keep this page bookmarked as these will be updated regularly with new content as it is released. Breakout Lessons In these lessons we take an introductory look into Unity and develop a simple game of &#8220;Breakout&#8221; using the systems we have. Part 1: Unity Basics Lesson 1: Layout Lesson 2: Physics Basics Lesson 3: Input Basics Lesson 4: Collision Basics Lesson 5: Scoring Basics Part 2: Software Patterns and Strategies Lesson 1: Patterns &#8211; Observer, Component, and Singleton Lesson 2: State Machine Basics Lesson 3: State Transitions Lesson 4:&hellip;<\/p>\n","category_list":"","author_info":{"name":"Tom Corbett","url":"https:\/\/courses.etc.cmu.edu\/53-341\/?author=2"},"comments_num":"0 comments","_links":{"self":[{"href":"https:\/\/courses.etc.cmu.edu\/53-341\/index.php?rest_route=\/wp\/v2\/pages\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.etc.cmu.edu\/53-341\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/courses.etc.cmu.edu\/53-341\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/courses.etc.cmu.edu\/53-341\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.etc.cmu.edu\/53-341\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":6,"href":"https:\/\/courses.etc.cmu.edu\/53-341\/index.php?rest_route=\/wp\/v2\/pages\/9\/revisions"}],"predecessor-version":[{"id":30,"href":"https:\/\/courses.etc.cmu.edu\/53-341\/index.php?rest_route=\/wp\/v2\/pages\/9\/revisions\/30"}],"wp:attachment":[{"href":"https:\/\/courses.etc.cmu.edu\/53-341\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}