Complete C# Unity Developer 2D - Learn to Code Making Games
4.6 (43,609 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
250,245 students enrolled

Complete C# Unity Developer 2D - Learn to Code Making Games

Game development & design. Learn C# using Unity 4.6, 5 & 2018. Your first 2D Unity games for web, Mac & PC.
Best Seller
4.6 (43,609 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
250,245 students enrolled
Last updated 7/2018
English
English
30-Day Money-Back Guarantee
Includes:
  • 54.5 hours on-demand video
  • 21 Articles
  • 40 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to Udemy's top 2,500+ courses anytime, anywhere.

Try Udemy for Business
What Will I Learn?
  • Learn C#, a powerful modern language, from scratch. No prior programming experience is necessary.
  • Become excellent at using the Unity game engine.

  • Build a solid foundation for game design and game development that will help you build your own games.

  • Learn how object oriented programming works in practice.
  • Personally create playable game projects - good for your portfolio, or just for your own sense of achievement.
  • Transfer your knowledge to .NET, other languages, and more.
  • Develop highly transferable coding problem solving skills.
  • Be part of an amazing and supportive community of people similar to you.
Curriculum For This Course
349 Lectures
59:53:38
+
Introduction & Setup
7 Lectures 33:51

In this video (objectives)…

  1. We make learning Unity & C# easy
  2. Introducing Ben & Rick
  3. What the course covers
  4. 40,000 reviews can't be wrong!

After watching (learning outcomes)… Recall why you were motivated to buy this course.

(Unique Video Reference: 1_IN_CUD)

Preview 02:35

This course is being updated at a rapid pace, using Unity 2018 and the latest coding best practices.

Preview 01:54

In this video (objectives)…

  1. Navigate to Unity's download page
  2. Download Unity Hub
  3. Select the latest version of Unity to download
  4. Select your download options from the list

After watching (learning outcomes)… Get Unity and Visual Studio downloading.

(Unique Video Reference: 2_IN_CUD)

Download Unity & Visual Studio
05:32

In this video (objectives)…

  1. Create a new Unity project
  2. Create a .cs script
  3. Add a simple print statement
  4. Attach script to camera game object
  5. Run script and see our statement printed to the console

After watching (learning outcomes)… Create a script and print a simple statement to the Unity console.

(Unique Video Reference: 3_IN_CUD)

Your First Code
10:42

In this video (objectives)…

  1. We use PC mostly throughout the course
  2. General differences you'll see on Mac versus PC
  3. Specific Unity and Visual Studio differences you'll see on a Mac.

After watching (learning outcomes)… Understand what difference to look for if on a Mac.

(Unique Video Reference: 4_IN_CUD)

Notes For Mac Users
03:42

In this video (objectives)…

  1. Options for getting help & support
  2. Using the Udemy Q&A section
  3. GameDev.tv community forum
  4. Discord chat server
  5. Facebook community group
  6. Google slides and close captions.

After watching (learning outcomes)… Exactly how and where to get help and support.

(Unique Video Reference: 5_IN_CUD)

Community & Support
09:01

In this video (objectives)…

  1. Great work on getting set up
  2. Let's dive into the next section.

After watching (learning outcomes)… You'll be set up and ready to go.

(Unique Video Reference: 6_IN_CUD)

Section Wrap Up
00:25
Test Your Understanding - Intro & Setup #1
4 questions
+

Number Wizard - Basic C# Coding

9 Lectures 01:15:57

In this video (objectives)…

  1. Overview of this section
  2. Code is mostly the same as the original code
  3. Let's get started!

After watching (learning outcomes)… Ready and raring to start.

(Unique Video Reference: 1_NC_CUD)

Welcome To Number Wizard Console
01:46

In this video (objectives)…

  1. Understand the game flow for the simple game we are making.
  2. Use Debug.Log() to print our welcome to the player
  3. Add three additional statements to give the player the requirements

After watching (learning outcomes)… Be able to print to the console using Debug.Log().

(Unique Video Reference: 2_NC_CUD)

Print To Console With Debug.Log()
10:52

In this video (objectives)…

  1. Discuss that variables are like boxes which store data.
  2. Create an integer variable to store our maximum guess value.
  3. Create an integer variable to store our minimum guess value.

After watching (learning outcomes)… Be capable of creating an integer type variable.

(Unique Video Reference: 3_NC_CUD)

Preview 07:23

In this video (objectives)…

  1. Problem solving discussion using Unity docs.
  2. Use Input.GetKeyDown() to recognise when a key is pressed.
  3. Use the KeyCode keyword to determine which key is pressed.
  4. Discuss white space, code blocks and bracketing.
  5. Introduce commenting.

After watching (learning outcomes)… Understand how to recognise player input using Input.GetKeyDown().

(Unique Video Reference: 4_NC_CUD)

Respond To Player Input
15:49

In this video (objectives)…

  1. Consider the problem we have of multiple key presses being possible.
  2. Discuss the difference between if, else if & else conditional statements.
  3. Implement an approach that makes our key presses mutually exclusive of one another.

After watching (learning outcomes)… Use if and else if statements to make key presses mutually exclusive.

(Unique Video Reference: 5_NC_CUD)

Using if, else if & else
05:29

In this video (objectives)…

  1. Discuss how C# is organised / grouped.
  2. Address the problem of scope and with our variables not being accessible.
  3. Create a guess variable.

After watching (learning outcomes)… Be cool with how scope applies to declaring and using variables.

(Unique Video Reference: 6_NC_CUD)

Preview 09:50

In this video (objectives)…

  1. Implement the simple calculation to guess the midpoint of our min and max.
  2. Fix an issue with the maximum guess not reaching 1000.
  3. Tidy up our text.
  4. Use github to access our code updates and lecture changes.

After watching (learning outcomes)…

Implement a simple calculation that updates our guess based upon player feedback.

(Unique Video Reference: 7_NC_CUD)

Calculate Guess Variable
11:29

In this video (objectives)…

  1. Create a new function for StartGame().
  2. Create a new function for NextGuess().
  3. Discussion encapsulating as it relates to C#.
  4. Finish our game.

After watching (learning outcomes)…

Create your first functions and finish off our simple game.

(Unique Video Reference: 8_NC_CUD)

Functions & Encapsulating
12:01

In this video (objectives)…

  1. Great work for completing this section.
  2. You're not supposed to understand everything yet.
  3. Keep pushing forward into the next section.

After watching (learning outcomes)…

Celebrate completing this section and push on to the next one.

(Unique Video Reference: 9_NC_CUD)

Number Wizard Console Wrap Up
01:18
Test Your Understanding - Number Wizard #1
9 questions
+

Text101

16 Lectures 02:45:59

In this video (objectives)…

  1. Overview of this section
  2. Flex your designer muscles if you're interested
  3. We'll be using Scriptable Objects to make a Text Adventure Game
  4. Let's get started!

After watching (learning outcomes)… Ready and raring to start this section.

(Unique Video Reference: 1_TX_CUD)

Welcome To Text101
02:44

In this video (objectives)…

  1. Overview of our game design, core mechanic and theme
  2. Some high level design insight on how we are creating a game for other people
  3. A challenge to flex your designer muscles and come up with your own game theme

After watching (learning outcomes)… Clear on the design for our game.

(Unique Video Reference: 2_TX_CUD)

Text101 Game Design
05:50

In this video (objectives)…

  1. Introduction to Unity's main windows - Hierarchy, Scene, Game, Project, Inspector.
  2. Create simple square and circle sprites.
  3. Compare the difference between 2D and 3D scene view.
  4. Build a simple platformer scene for fun.

After watching (learning outcomes)… Capable of adding sprite Game Objects into a scene in Unity.

(Unique Video Reference: 3_TX_CUD)

Creating Sprites In Unity
14:13

In this video (objectives)…

  1. Introduction to Unity canvas for UI.
  2. Initial discussion of parent-child relationship for Game Objects in hierarchy.
  3. Add text elements.
  4. Edit text, resize elements.
  5. Add UI images as background elements.

After watching (learning outcomes)…

Able to create UI Canvas with text elements and plain image objects.

(Unique Video Reference: 4_TX_CUD)

UI Canvas & Text
11:50

In this video (objectives)…

  1. Deeper understanding of how Unity Game Objects, Components and Properties relate to one another.
  2. Introduction to [SerializeField].
  3. Creating a reference to a text field.
  4. Printing a string to our UI text field.

After watching (learning outcomes)…

Capable of programmatically adding a string of text to a UI text field.

(Unique Video Reference: 5_TX_CUD)

Update Text Component
14:23

In this video (objectives)…

  1. What are states and what is a state machine.
  2. Creating decision points for the player.
  3. How to manage all of our states and conditions - scriptable objects.

After watching (learning outcomes)…

Understand our requirements regarding states and create your first state for your text adventure game.

(Unique Video Reference: 6_TX_CUD)

Game States
07:18

In this video (objectives)…

  1. What is a scriptable object and why use it?
  2. Use CreateAssetMenu so that we have a context menu to add scriptable objects.
  3. Create our first scriptable object.

After watching (learning outcomes)…

Create our first scriptable object.

(Unique Video Reference: 7_TX_CUD)

Unity Scriptable Objects
09:25

In this video (objectives)…

  1. Public versus private access modifier.
  2. What are return types for methods.
  3. Writing a public method and accessing it from another class.

After watching (learning outcomes)…

Create a public method and access it from another class.

(Unique Video Reference: 8_TX_CUD)

Public Methods & Return Types
10:34

In this video (objectives)…

  1. What is an array and how are arrays created.
  2. Returning an array type variable from within a public method.
  3. Assigning array elements in Unity by dragging and dropping into the inspector.
  4. How to lock the inspector window.

After watching (learning outcomes)…

Understand how to create arrays and assign elements to arrays in code or in the inspector.

(Unique Video Reference: 9_TX_CUD)

Creating An Array
13:39

In this video (objectives)…

  1. Create a small game loop by having each state lead to another state.
  2. Create a method to respond to player's key input.
  3. Update the game's state based upon the next state array options.

After watching (learning outcomes)…

Complete our small adventure game engine using player input and state flow.

(Unique Video Reference: 10_TX_CUD)

Manage Next States
10:17

In this video (objectives)…

  1. Using draw.io for our state diagram and flow.
  2. Time to create your own story.

After watching (learning outcomes)…

Capable of creating a flow chart for your story.

(Unique Video Reference: 11_TX_CUD)

Game State Story Design
07:49

In this video (objectives)…

  1. Complete our game flow by adding all story states, and start and end states.

After watching (learning outcomes)…

Add all our states to our game.

(Unique Video Reference: 12_TX_CUD)

Organise State Files
10:33

In this video (objectives)…

  1. Using Unity's Package Manager to install TextMesh Pro.
  2. Font a font online to bring into your project.
  3. Create font atlas using the font you found and TextMesh Pro.
  4. Create a TextMesh Pro text for your title.
  5. Find a colour scheme you like and update the colours in your game.

After watching (learning outcomes)…

Know how to use TextMesh Pro and how to polish the look of your game.

(Unique Video Reference: 13_TX_CUD)

TextMesh Pro & Polish
13:14
Test Your Understanding - Text101 #1
10 questions

In this video (objectives)…

  1. Further discussion regarding state as a class and state as a variable.
  2. Further discussion on how scriptable objects work, where they are saving and what is required.
  3. Code formating - where it matters and where it doesn't.
  4. Why we didn't dig into more narrative design in this section.

After watching (learning outcomes)…

Deeper understanding of the concepts covered thus far in this section.

(Unique Video Reference: 14_TX_CUD)

Text101 Instructor Hangout #1
11:50

In this video (objectives)…

  1. Adjust our screen aspect ratio and scaling.
  2. Create a WebGL build.
  3. Zip our build foler and upload to sharemygame.com.
  4. Celebrate, you've published a game!

After watching (learning outcomes)…

Create a WebGL build and publish online.

(Unique Video Reference: 15_TX_CUD)

Publish Your WebGL Game
10:42

In this video (objectives)…

  1. Find a bug in our game which causes our standalone PC build to break.
  2. Figure out why the game is breaking because of the bug.
  3. Use a for loop to change our input mechanism and stop ArrayOutOfIndex errors.

After watching (learning outcomes)…

Fix our ArrayOutOfIndex error using a for loop for player input.

(Unique Video Reference: 16_TX_CUD)

For Loops
11:38
+
Number Wizard UI
12 Lectures 01:40:50

In this video (objectives)…

  1. Overview of this section.
  2. Focus on UI - adding buttons, text, images.
  3. Linking our button functionality with our code.
  4. Creating scenes and loading scenes.

After watching (learning outcomes)… Ready and raring to start this section.

(Unique Video Reference: 1_UI_CUD)

Welcome To Number Wizard UI
01:59

In this video (objectives)…

  1. Reminder of the core guessing game mechanic.
  2. Presentation of our game flow through the main scenes.
  3. Discussion of theme and tone of the game.

After watching (learning outcomes)… Clear on the design objectives for the game.

(Unique Video Reference: 2_UI_CUD)

Number Wizard UI Game Design
04:07

In this video (objectives)…

  1. Add a button to our canvas.
  2. Add an image to our canvas.
  3. Adjust the stretch and anchor settings so that our UI assets are aligned how we want them to be even if the game is played at different aspect ratios or resolutions.

After watching (learning outcomes)… Capable of implementing UI anchor points works.

(Unique Video Reference: 3_UI_CUD)

UI Anchors
09:59

In this video (objectives)…

  1. Add mouse over and click effect to our button.
  2. Improve font quality using TextMesh Pro text for the button.
  3. Create 3 scenes, each of which has a button that can be used to load new scenes.

After watching (learning outcomes)… Create nice looking buttons that can be used for awesome functionality.

(Unique Video Reference: 4_UI_CUD)

Making Buttons
12:21

In this video (objectives)…

  1. Create public method to load the next scene.
  2. Add build index to scenes.
  3. Hook up start button with LoadNextScene() public method.

After watching (learning outcomes)… Create public method to load next scene, triggered from a button.

(Unique Video Reference: 5_UI_CUD)

Button Click Loads Scene
11:58

In this video (objectives)…

  1. Create new method to load straight to our first scene.
  2. Hook up all buttons to loading functionality.
  3. Load all scenes.

After watching (learning outcomes)… Load all scenes in our game using buttons.

(Unique Video Reference: 6_UI_CUD)

Load All Scenes
06:11

In this video (objectives)…

  1. Examine our "spec" for the game screen.
  2. Implement all the buttons, text, images required for the game screen.
  3. Ensure all game objects are properly named and ready for action.

After watching (learning outcomes)… Implement UI elements required for our core game from our game design.

(Unique Video Reference: 7_UI_CUD)

Prepare Game Screen
09:39

In this video (objectives)…

  1. Import our NumberWizard.cs code from previous section of the course.
  2. Assess what needs to be refactored / changed in order to have our code work with our user interface.
  3. Refactor the code including player input mechanism.

After watching (learning outcomes)… Refactor our code so that it is ready to hook up with our user interface.

(Unique Video Reference: 8_UI_CUD)

Import & Refactor Code
07:11

In this video (objectives)…

  1. Hook up our buttons to the previously created methods.
  2. Link our UI text field to our code.
  3. Use ToString() to convert our integer into a string to be displayed in our text field.

After watching (learning outcomes)… Connect a variable in our code with a text field in our UI.

(Unique Video Reference: 9_UI_CUD)

Using ToString()
08:27

In this video (objectives)…

  1. Use Random.Range() for our guess to introduce randomness.
  2. Refactor our code to only have 1 place of calculating guess.
  3. Tweak our logic to prevent the computer from guessing a number already guessed.

After watching (learning outcomes)… Use Random.Range() to add randomness to the number guessed.

(Unique Video Reference: 10_UI_CUD)

Use Random.Range()
08:32

In this video (objectives)…

  1. Use Application.Quit() to create a quit button for our game.
  2. Add final text, colours and tweaks to the game.
  3. Build to PC, Mac, Linux Standalone.

After watching (learning outcomes)… Create a final PC / Mac / Linux Standalone build.

(Unique Video Reference: 11_UI_CUD)

Polish & Standalone Build
10:20
Test Your Understanding - Number Wizard UI #1
10 questions

In this video (objectives)…

  1. We discuss namespaces in more detail.

After watching (learning outcomes)… A hangout where Ben and Rick talk about namespaces.

(Unique Video Reference: 12_UI_CUD)

NWUI Instructor Hangout #1
10:06
+
Block Breaker
14 Lectures 02:09:14

In this video (objectives)…

  1. Overview of this section.
  2. Focus on Unity's physics engine and collisions.
  3. Lots of creative opportunity to make your own levels, background, blocks, rules, tuning and so on.

After watching (learning outcomes)… Ready and raring to start this section.

(Unique Video Reference: 1_BR_CUD)

Welcome To Block Breaker
01:37

In this video (objectives)…

  1. Fundamental aspects of our design.
  2. Ideas for your game.
  3. Challenge for your game theme, background image and name.

After watching (learning outcomes)… Clear on the game design we will use for Block Breaker.

(Unique Video Reference: 2_BR_CUD)

Block Breaker Game Design
05:46

In this video (objectives)…

  1. Export scenes and SceneLoader.cs from previous project.
  2. Import package into our new project.
  3. Set up build settings, change aspect ratio, update text.

After watching (learning outcomes)… Export scenes and logic from one project and import as a package into another.

(Unique Video Reference: 3_BR_CUD)

Export & Import Package
13:01

In this video (objectives)…

  1. Discuss what Unity World Units are.
  2. Set up our camera size.
  3. Import and set up background image, paddle, ball and block.

After watching (learning outcomes)… Understand world units and set up play space.

(Unique Video Reference: 4_BR_CUD)

World Units & Play Space
11:45

In this video (objectives)…

  1. Add a Rigidbody2D to the ball so that it has gravity influencing it.
  2. Add colliders to ball and block so that they collider.

After watching (learning outcomes)… Able to add the core physics components to 2D objects.

(Unique Video Reference: 5_BR_CUD)

Rigidbody & Colliders
07:18

In this video (objectives)…

  1. Add Polygon Collider 2D to our paddle.
  2. Add Physics Material 2D to our ball.
  3. Bounce!

After watching (learning outcomes)… Make a game object bounce off another game object.

(Unique Video Reference: 6_BR_CUD)

Add Unity Physics Material
06:43

In this video (objectives)…

  1. Stop our ball rotating by freezing Z axis rotation on our Rigidbody.
  2. Create a lose collider.
  3. Discuss difference between trigger and collider and examine the event matrix for collision events.
  4. Load Game Over screen when ball passes through lose collider.

After watching (learning outcomes)… Make the game load a new scene when an object passes through a trigger volume.

(Unique Video Reference: 7_BR_CUD)

Colliders, Collision & Triggers
12:14

In this video (objectives)…

  1. Find the position of the mouse on the screen.
  2. Convert the mouse position into a relative proportion of our screen represented as game units.
  3. Link movement of our mouse to movement of our paddle.

After watching (learning outcomes)… Move a game object so that it matches the position of the player's mouse.

(Unique Video Reference: 8_BR_CUD)

Move Object With Mouse
14:53

In this video (objectives)…

  1. Figure out the range we want to allow the paddle to move on x axis.
  2. use Mathf.Clamp() to limit the paddle's movement.

After watching (learning outcomes)… Use Mathf.Clamp() to limit the movement of a game object.

(Unique Video Reference: 9_BR_CUD)

Limit With Mathf.Clamp()
05:00

In this video (objectives)…

  1. Understand how to calculate the distance from ball to paddle.
  2. Update location of the ball to match the location of the paddle plus our offset.

After watching (learning outcomes)… Stick the ball to the paddle.

(Unique Video Reference: 10_BR_CUD)

Distance As A Vector2
12:56

In this video (objectives)…

  1. Create a method to give the ball an upwards velocity.
  2. Create a bool which allows us to determine if the game has started yet and therefore stop locking the ball to the paddle.

After watching (learning outcomes)… Launch the ball with upward velocity from the paddle.

(Unique Video Reference: 11_BR_CUD)

Launch The Ball
10:41
Test Your Understanding - Block Breaker #1
10 questions

In this video (objectives)…

  1. Ben and Rick discuss the use of public variables versus [SerializeField].

After watching (learning outcomes)… Understand why we avoid using public variables in our classes.

(Unique Video Reference: 12_BR_CUD)

Block Breaker Instructor Hangout #1
07:14

In this video (objectives)…

  1. Add walls for our ball to bounce off.
  2. Alter the gravity so that the ball doesn't slow down due to gravity.

After watching (learning outcomes)… Set up our play space and change our gravity.

(Unique Video Reference: 13_BR_CUD)

Play Space & Gravity
10:17

In this video (objectives)…

  1. Add Block.cs script to our block.
  2. Use the Destroy() method to destroy the block once its hit.
  3. Discuss the option to set arguments for the method.

After watching (learning outcomes)… Destroy our block when the ball hits it.

(Unique Video Reference: 14_BR_CUD)

Destroy GameObject
09:49
+
Updates And Important Messages
2 Lectures 03:08

You've reached the end of the current 2018 remaster. In this video we discuss your options for continuing to push forward.

Message About New Content
02:28

This lecture explains how to get access to the original Unity 4 / Unity 5 content for this course.

Coupon For Original Course Content (Created In Unity 4 / 5)
00:40
+
Block Breaker
43 Lectures 05:52:46
IN THIS VIDEO...
  • 2D Collisions & destroying objects.
  • Triggering SFX and music.
  • Responding to mouse input.
  • Automated playtesting.
  • Build & share your own levels.
Introduction To Block Breaker
02:03
Section 5 Game Design Document
3 pages
Your Block Breaker Assets
1 page
Section 5 Notes
34 pages

IN THIS VIDEO...

  • How to use GIMP as an alternative to PhotoShop (link below)
  • Selecting in Gimp
  • Cropping and Scaling
  • Adjusting Colour and Exposure
  • Saving Your Image
Gimp Image Editing 101
10:58
IN THIS VIDEO...
  • Researching brick sizes.
  • Source an appropriate image.
  • Edit our brick sprites.
  • Create new project and import.
Creating A 2D Brick Sprite
09:20
IN THIS VIDEO...
  • Export the menus from Number Wizard UI.
  • Import to this project.
  • Customise the words & fonts.
  • Wire up the buttons.
Import The Menu System
09:36

IN THIS VIDEO...

  • How persistent music improves quality.
  • Add a Music Player Game Object.
  • Add a music track of your choice.
  • Use GameObject.DontDestroyOnLoad().
  • Test your music plays consistently.
SOME USEFUL LINKS...
  • Sounds - Freesound.org
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Playing Background Music
09:38

IN THIS VIDEO...

  • How a static can help us here.
  • Watch Unity's short video*
  • Preventing duplicate music players.

SOME USEFUL LINKS...

  • Unity 3D Statics
(NOTE YOU CAN CLICK THESE LINKS BELOW)
About Statics & Singletons
03:32
Using Static Variables
07:57

Explaining that we don't use the music manager again for a while.

A Note About The Music Manager
00:06
  • Introducing Script Execution Order*
  • Exactly when do scripts get called?
  • Debugging & explaining our music glitch
  • A simple fix using the Awake() method

SOME USEFUL LINKS...

*http://docs.unity3d.com/Manual/ExecutionOrder.html

(NOTE YOU CAN CLICK THESE LINKS BELOW)

Execution Order & Singletons
09:45

In this video...

  • What z-depth means.
  • The problem: sprites becoming semi-transparent or invisible for unknown reasons.
  • The solution: look at the z-position of sprites relative to the background.
Z-Depth in 2D games
02:50
Setting Up Your Play Space
08:48
IN THIS VIDEO...
  • Add a ball to your space
  • Import the ball sprite to Sprites folder.
  • Set a sensible “Pixels Per Unit” value.
  • Place the ball in the middle of the play space.
Ball + Gravity + Colliders = Fun
08:07
IN THIS VIDEO...
  • What are colliders
  • If colliders overlap during a frame then…
  • … messages may be passed by the engine.
  • What is message passing?
  • Signatures of messages passed
  • Types of colliders explained
Colliders, Triggers & Collisions
09:41
IN THIS VIDEO...
  • Delete Music Player on Level_01 scene.
  • Setting Game window to 800 x 600.
  • Two handy keyboard shortcuts.
  • Remove Canvas and Event System from Level_01.
  • Make loose collider load next level.
Tidying Up Before Moving On
08:35

IN THIS VIDEO...

  • Add our brick sprite as a player paddle.
  • Choosing our paddle collider type.
  • Rigid Body 2D
  • CHALLENGE: Add components to our paddle.
Choosing Collider Type In Unity
08:25
Mid Section QUIZ
7 questions
IN THIS VIDEO...
  • What is a physics material.
  • Add a bouncy material.
  • Observe funky physics.
Using Physics Materials
06:34

IN THIS VIDEO...

  • Using Input.MousePosition.x
  • Screen.width to get screen width.
  • Move the paddle this.transform.position
  • Introducing float and Vector3.
  • Using Mathf.Clamp to constrain paddle.
  • Fix the paddle's “Pixels per unit” to 128.

SOME USEFUL LINKS...

  • Unity Scripting API

(NOTE YOU CAN CLICK THESE LINKS BELOW)

Movement By Mouse
13:11
IN THIS VIDEO...
  • Start the ball sitting on the paddle.
  • Capture the relative position from the editor.
  • Respond to Input.GetMouseButtonDown(0).
  • rigidbody2D.velocity to launch the ball.
  • Using bool hasStarted to keep track.
Launching Ball On Mouse Click
14:22
IN THIS VIDEO...
  • Setup all your play space wall colliders.
  • Adjust the initial velocity and gravity.
  • Understanding Gravity Scale
Invisible Colliders & Gravity Scale
10:21
IN THIS VIDEO...
  • What is a prefab in Unity
  • Why prefabs are useful.
  • Setting up your prefabs.
  • How prefab linking works.
Creating & Using Unity Prefabs
13:05
IN THIS VIDEO...
  • How Edit > Snap Settings works.
  • Snap initially to get on the grid.
  • You can do this with multi-select.
  • Hold cmd (ctrl) while dragging!
  • Build your first level
Unity Editor Snap To Grid
05:42
IN THIS VIDEO...
  • Make everything a prefab!
  • Set Main Camera background to black.
  • Move & group Loose Collider.
  • Test by making new level.
Making Everything A Prefab
09:42
IN THIS VIDEO...
  • Why linking prefabs programmatically helps.
  • Unity doesn't support “nested prefabs”.
  • How to use GameObject.FindObjectOfType< >
  • Link the ball to the paddle programatically.
  • Challenge: do this for LevelManager
GameObject.FindObjectOfType
08:55
IN THIS VIDEO...
  • Create Loose Scene, modify LooseCollider.cs
  • Add LoadNextLevel() to LevelManager.cs
  • Add all our levels to Project > Build Settings
  • Modify Block.cs by adding SimulateWin()
  • Test that game transitions between levels
Level Build Order
10:58
IN THIS VIDEO...
  • How the Destroy() method works.*
  • Why we destroy gameObject not this.
  • Challenge: only destroy on max hits
SOME USEFUL LINKS...
  • Object Destroy - Unity scripting API
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Destroying When Hit
10:18
IN THIS VIDEO...
  • Why a sprite sheet is useful.
  • Key features of a sprite sheet.
  • Creating sprites for partially broken blocks.
  • Importing sprites into Unity.
Importing Sprite Sheets
15:41
IN THIS VIDEO...
  • The affordance principle
  • What is an array?
  • Using arrays to store these sprites.
  • Loading sprite when hit.
Swapping Sprites In Script
11:57
IN THIS VIDEO...
  • What are tags?*
  • Why tags are useful for keeping track.
  • Tagging unbreakable bricks.
  • Use tags to decide when level is won.

SOME USEFUL LINKS...

  • Unity 3D Tags

(NOTE YOU CAN CLICK THESE LINKS BELOW)

Consolidating Hit Counting
12:48
IN THIS VIDEO...
  • Why loading levels could be problematic.
  • How a static Brick variable can help.
  • Keeping track of breakable bricks in the level.
  • Creating a simple BrickDestroyed “message”.
  • Testing inc. when 2 bricks destroyed at once.
SOME USEFUL LINKS...
  • Statics to detect win condition end state
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Statics To Detect Win Condition
14:00

IN THIS VIDEO...

  • Using audio.Play() to play “boing” sound;
  • Why AudioSource.PlayClipAtPoint useful.
  • Using this for playing “crack”.
  • Test & demonstrate.

SOME USEFUL LINKS...

  • Playing sound effects on impact end state

(NOTE YOU CAN CLICK THESE LINKS BELOW)

Playing Sound Effects On Impact
12:03

In this video (objectives)…

  1. Use Random.Range() for our guess to introduce randomness.
  2. Refactor our code to only have 1 place of calculating guess.
  3. Tweak our logic to prevent the computer from guessing a number already guessed.

After watching (learning outcomes)… Use Random.Range() to add randomness to the number guessed.

Using Random.Range()
08:35
IN THIS VIDEO...
  • Create & tidy your levels
  • Ensure Hierarchy is tidy in each level.
  • Give each level a different 800x600 background.
  • Play test all the levels.
  • Ensure level order is right in File > Build Order.
Automated Play Testing
14:05

IN THIS VIDEO...

  • Revising setting your Game window.
  • How to tweak sound levels.
  • Doing a test web build and playing locally.
  • Revising building and sharing to web.
  • Looking forward to seeing your levels!
SOME USEFUL LINKS...
  • AudioSource - Unity Scripting API
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Build & Share On The Web
07:46
IN THIS VIDEO...
  • How to reproduce the problem?
  • Debug to find the root cause.
  • Make the fix, and re-test.
  • Remove debug code.
  • Challenge: Fix the bug
Fixing User Reported Bugs
05:57
IN THIS VIDEO...
  • What's a polygon collider.
  • Why it can help us improve our game.
  • How to manipulate polygon colliders.
  • Challenge: Chamfer your paddle.
More Complex Collider Shapes
12:47
IN THIS VIDEO...
  • The coding trade off triangle.
  • Think about your future self on the project.
  • Renaming a game object and class.
  • Using Debug.LogError().
Making Code Extendable
07:10

IN THIS VIDEO...

  • Create a simple particle system.
  • Make brick look like it goes “up in smoke”.
  • Write code to trigger smoke puffs.
  • Tweak the smoke prefab while play testing.
SOME USEFUL LINKS...
  • Unity - Manual: Particle Systems
  • Object Instantiate - Unity Scripting API
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Using Particle Systems
11:09

OPTIONALLY converting your project to Unity 5, and sharing with Web GL.

BB Unity 5 Upgrade & WebGL Build
04:25
DOWNLOAD Section 5 Unity Project
00:22
Section End QUIZ
5 questions

IN THIS VIDEO...

  • Recap and what's next
  • Congratulations, you've learnt a lot.
  • Make your own levels.
  • Ask a friend to make levels.
  • Care with commercial music.
  • Share your creation in Discussions, or www.CompleteUnityDeveloper.com (link below)


Section 5 Wrap Up
01:32
+
Laser Defender
27 Lectures 04:24:27

IN THIS VIDEO...

  • Laser Defender introduction
  • What Laser Defender teaches
    • Animation basics
    • Using Trigger colliders
    • Introduction to Particle Systems
Introduction to Laser Defender
01:33
Section 6 Game Design Document
3 pages
Your Laser Defender Assets
1 page
Section 6 Notes
132 pages
IN THIS VIDEO...
  • Open our previous game and import the menu system
  • Create a unity package
  • Import package into Laser Defender
  • Alternatively, we can use the unitypackage from the section bundle at the beginning of this section
Importing The Menu System
05:01

IN THIS VIDEO...

  • Find a suitable sprite asset
  • Import into our game
  • Create a Player Controller Script to move it
  • Restrict the movement to the playspace
SOME USEFUL LINKS...
  • OpenGameArt.org
  • Kenney · Game development studio, Netherlands · Home
  • Space Shooter Redux
(NOTE YOU CAN CLICK THESE LINKS BELOW)
A Starship We Can Control
11:16
IN THIS VIDEO...
  • How to stop the spaceship from going outside the playspace
  • We will check the position when moving and restrict it to something sensible
Restricting The Player's Position
15:38
IN THIS VIDEO...
  • Creating the enemy prefab
  • Create an EnemySpawner that will generate enemies at runtime
  • Make the EnemySpawner generate a single enemy on start
Creating The Enemies
10:17

IN THIS VIDEO...

  • Create a position within the EnemyFormation
  • Use OnDrawGizmos() to show the position
  • Turn the position into a prefab
  • Change the spawning script to keep track of positions
Creating Enemy Positions
14:22
IN THIS VIDEO...
  • Showing the Formation in the Editor
  • Show all four sides of the formation
  • Move the formation side to side
Moving The Enemy Formation
18:07

IN THIS VIDEO...

  • Fix the boundary issue with the formation getting stuck on the edge of the playspace
Fixing The Formation Movement
06:05
IN THIS VIDEO...
  • Player object should spawns laser when [space] is pressed
  • Create a laser prefab
  • We use Instantiate() to create a new one
  • We give the projectile velocity
Spawning Projectiles
19:38

What did we need to do to get the Laser Defender game set up? We'll review some of the key learnings and new concepts introduced.

Mid Section QUIZ
9 questions
IN THIS VIDEO...
  • Enemies will respond to the projectile hitting them.
  • We use Kinematic Rigidbody Triggers for the enemies
  • On trigger, enemy takes damage according to projectile component
  • Defining the projectile behaviour
  • Detect laser collisions
  • Getting the damage from the lasers
Shooting Enemies
18:09
IN THIS VIDEO...
  • Enemies will randomly shoot back with a tuneable frequency
  • Make enemies shoot at the player
  • Create enemy projectile
  • Getting hit by the enemy
  • Tuning the frequency
Enemies Shooting Back
22:51
IN THIS VIDEO...
  • Player shoots itself when firing!
  • Lasers hit each other!
  • We need the player's projectile not to collide with itself or the player
  • We need the enemy projectiles to not collide with enemies or each other
Controlling Collisions with Layers
08:12
IN THIS VIDEO...
  • We need to know when all enemies are dead
  • We use the childCount property of a transform on the positions - an empty position is a dead enemy
  • We re-spawn the enemies when that happens
Detecting Enemies Have Been Destroyed
08:58

In this video we will:

  • Learn how to use recursive functions for the first time
  • Make something happen multiple times with a delay between each time
Spawning Enemies One By One
10:12
Mid Section QUIZ
9 questions
IN THIS VIDEO...
  • Enemies should animate in, rather than appear
  • Create an Animator and Animation Controller
  • Create states to represent arriving and flying
  • Add the appropriate animation
Enemy Position Animation
19:55
IN THIS VIDEO...
  • The background looks a little barren
  • Let's add a starfield with parallax effect to give some sense of depth
  • We can use a Particle System to do this.
  • Explore Particle Effects
Creating A Starfield
12:20
IN THIS VIDEO...
  • Requires Some object to keep track of the scores
  • Create the UI for the score
  • We'll create a ScoreKeeper that we attach to the score
  • When an Enemy dies, we'll call the ScoreKeeper
Keeping Score
13:52
IN THIS VIDEO...
  • Adding sound to your game
  • Will make a huge difference to our game
  • Easy enough to do
  • We'll look at playing sounds independently of an object, so that we can play a death sound for the enemies
Sound Effects For Fun And Profit
07:33
IN THIS VIDEO...
  • Sprite rendering order changes which sprites are drawn on top
  • Lets missiles from the player be drawn below the ship when instantiated
  • Create appropriate sorting layers
  • Laser defender now with layers
Sprite Rendering Order
07:07
IN THIS VIDEO...
  • Replacing the menu style
  • Passing the score to the ends
Polishing The Menu System I
15:23

IN THIS VIDEO...

  • Adding our own music to the game
  • Adding a background starfield
SOME USEFUL LINKS...
  • OpenGameArt.org
  • Clearside home
  • Clearside music
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Polishing The Menu System II
12:02
  • Upgrade to Unity 5.
  • About Web GL builds.
  • Build for Web GL and share.
LD Unity 5 & Web GL Sharing (Optional)
03:32

Here is our Unity project at this point in the section. Use it to compare code / settings etc if you get stuck. Once un-zipped you can use File > Open Project in Unity, or browse the folders for any .unity file.

You can get to ALL videos end-state by...

1. Visiting https://github.com/CompleteUnityDeveloper

2. Clicking on the section name.

3. Clicking XX Commits at the top-left (XX will vary)

4. Against the video you want, click the <> button on right.

5. On final page (example) click Download Zip button.

Good luck!

DOWNLOAD Section 6 Unity Project
00:11
Section End QUIZ
12 questions
IN THIS VIDEO...
  • Recap and what's next
  • New in your toolkit
  • Trigger Colliders
  • Sprite Animations
  • Particle Systems
  • Physics Layers
  • Sorting Layers
Section 6 Wrap Up
02:13
+
Glitch Garden: A Plants vs. Zombies Clone
58 Lectures 10:51:56

LEARNING OBJECTIVES

MAJOR: 2D Animation (frame, and rigged)

Minor A: Mobile compatible, no keyboard use.

Minor B: Components to make code extendable.

Minor C: Options Menu scene & PlayerPrefs.

Introduction To Glitch Garden
01:54
Section 7 Game Design Document
00:05
Your Glitch Garden Assets
1 page
Section 7 Notes
47 pages

In this video...

  • What is a splash screen
  • Why use a splash screen
  • Singleton-free music manager
  • Make you splash-screen
  • Add music, and make Start Menu auto-load

Some useful links...
  • Fonts: dafont.com
  • Sound: Freesound.org - Freesound.org

(Note you can click these links below)

Making A Splash Screen
14:26

IN THIS VIDEO...

  • We're building for “mobile first” here.
  • No use of keyboard, just tap & drag.
  • Mobile device aspect ratios.
SOME USEFUL LINKS...
  • Handling resolutions and aspect ratio of common mobile devices for web, application and game development
  • Unity 3D - Manual: Rect Transform
  • Unity 3D - Canvas Scaler
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Scaling & Aspect Ratios
13:57
IN THIS VIDEO...
  • An alternative MusicManager.cs architecture
  • Customise your Win and Loose scenes.
  • Test it all looks and sounds good.
Alternative Music Manager
13:36
IN THIS VIDEO...
  • Customise Win and Loose Scenes.
  • Add a new Options scene (blank for now).
  • Add two buttons: “Back”, “Defaults”.
  • Make Level_01 with “Win” and “Loose” buttons.
  • Test all the navigation and music works properly.
Menus, Options & Music
17:29
IN THIS VIDEO...
  • Adding a nice fade-in to the Start Scene.
  • Giving-up on spelling loose / lose / whatever.
  • Add background image to levels.
  • Check it all flows / scales nicely.
Adding Fade Transitions
12:48
IN THIS VIDEO...
  • Canvas Scaler “Screen Match Mode”.
  • Use a “Raw Image” & grass texture.
  • Define play space, and quiet zones.
  • Setup our Level with prefabs.
Scaling Level Backgrounds
08:49

A brief talking-head video where Ben Tristem introduces how to use PlayerPrefs in Unity.

Introducing PlayerPrefs
02:56
IN THIS VIDEO...
  • What is PlayerPrefs, and why is it useful?
  • Limitations of PlayerPrefs
  • Why we're providing our own wrapper class.
  • Create PlayerPrefsManager.cs static wrapper.
Our PlayerPrefsManager.cs
09:46

Ben recaps where we are, and continues building the PlayerPrefsManager.

Our PlayerPrefsManager - part 2
11:33
A Note On The Next Lecture
00:06

IN THIS VIDEO...

  • Introducing UI sliders.
  • Add volume and difficulty sliders.
  • Create OptionsController.cs.
  • Ensure sliders work.
UI Sliders For Options
18:03
Mid Section QUIZ
6 questions

IN THIS VIDEO...

  • The sprite sheet (AKA sprite atlas).
  • Comparison to bone-based animation.
  • Importing & slicing sprite sheets.
  • Making your first animation.
Sprite Sheet Animation
14:38
  • The fundamentals of ratio math(s).
  • What screen aspect ratios mean.
  • How to convert between different aspects.
Ratio Math Primer
05:04
IN THIS VIDEO...
  • Change to world space canvas for levels.
  • Adjust grass tiling (using UV Rect).
  • Add temporary “Core Game” panel.
  • Translate & scale the level canvas.
  • Adjust & prefab the camera.
World Space UI Canvas
15:54
IN THIS VIDEO...
  • How animators, states & motion clips relate
  • Adding multiple animation states & clips.
  • Options for transitioning between them.
  • Again, only animate one character for now.
The Animation Controller
15:27

IN THIS VIDEO...

  • Why my Lizard animation looked fuzzy.
  • What to do about it.
  • Max texture size for mobile devices.
  • A bit about MIP Mapping while we're here.
SOME USEFUL LINKS...
  • Mobile Max Texture Size
  • TexturePacker - Create Sprite Sheets for your game!
  • ShoeBox
  • Glitch
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Texture Size & Compression
10:13

IN THIS VIDEO...

  • Introducing “bone based animation”.
  • Using Gimp on Mac or PC to slice images*
  • How to import and set pivot points.

*Same principles apply to any other image editor.

Using Gimp To Slice Images
11:37
IN THIS VIDEO...
  • Animating Position, Rotation and Scale.
  • Challenge: create your bone animation(s).
2D “Bone-Based” Animation
15:45
  • Different ways of animating objects
  • Different ways of moving transforms
  • Options for combining these.
Animating Our Lizard
11:24
  • Animating the cactus from scratch
  • Re-capping the 5-step process.
Animating Our Cactus
08:30
  • Finishing the defender animations
  • How to make a sprite face the other way.
Finishing Our Defenders
11:53
  • Finish our attackers
  • How to access our code on GitHub.
Finishing Our Attackers
11:04
IN THIS VIDEO...
  • Giving our projectiles rotation in the animator.
  • Giving them translation from the animator*
  • Seeing the combined motion.
*We will change translation to script later.

SOME USEFUL LINKS...

  • GameBucket
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Projectile Animation
09:59

IN THIS VIDEO...

  • What's Unity Remote and why's it useful.
  • Unity Remote 4 on app stores (iOS and Android)
  • How to use it.
  • It's limitations.
SOME USEFUL LINKS...
  • Unity Remote 4
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Using Unity Remote
07:36
IN THIS VIDEO...
  • Read music volume on load, improve Win & Lose.
  • Catch 1st order error with autoLoadLevelAfter().
  • Alternative fade without coding (thank Ryan).
  • Save our scene of sprites & prefab everything.
  • Our current project state is attached.
Review & Improvements
12:55
Mid Section QUIZ
7 questions
IN THIS VIDEO...
  • Create an Attacker.cs component.
  • Why this component model is useful.
  • Tune our animation to avoid “moon walking”.
Moving Attackers From Script
11:42
IN THIS VIDEO...
  • Using OnTriggerEnter2D (Collider2D collider).
  • Why we are using triggers not physics.
  • Why we won't use the collision matrix this time.
  • Adding appropriate colliders to all objects.
Collision Matrix In Script
16:57
IN THIS VIDEO...
  • The “what” and “why” of animation events.
  • What methods can be called, and what can't.
  • Modify Attacker.cs to accept speed events.
  • Get animation transitions working for all attackers.
  • Add “wishful” StrikeCurrentTarget() method.
Using Animation Events
18:13
IN THIS VIDEO...
  • The different approaches to abstraction.
  • The benefits of a component model.
  • Get StrikeCurrentTarget() working.
Components “vs” Inheritance
19:31

IN THIS VIDEO...

  • Why a separate component makes sense.
  • Create & attach Health.cs component.
  • Test destruction, and initial play tuning.
Using A Health Component
15:37
IN THIS VIDEO...
  • Three approaches to 2D projectile animation.
  • Separate defenders from their projectiles.
  • Animate projectile using script and animator.
  • Fix-up defender animation states.
Animating Defenders & Projectiles
21:32
IN THIS VIDEO...
  • Why fire by animation events.
  • Create Shooter.cs for shooting defenders.
  • Create FireGun() method in Shooter class.
  • Attach a gun gameObject to spawn projectiles.
  • Arrange for animator to fire projectiles.
Animator Firing Projectiles
18:15
IN THIS VIDEO...
  • Why our Gnome fires too fast.
  • Possible solutions to this type of issue.
  • Why we choose to create a “fire” state.
  • Fine-tune projectile size & spawn position.
Separate Attack & Fire States
10:02
IN THIS VIDEO...
  • Make projectiles damage Attacker with Health.
  • Setup a play space, and start tuning.
  • Tweak damage and health levels.
  • We'll play tune again later.
Handling Projectile Damage
06:39
IN THIS VIDEO...
  • Setting up buttons for defender (tower) selection.
  • Initially they just toggle sprite colour.
  • Setup DefenderSelector.selectedDefender static
  • Test that static is set at start, and on button press.

(Unique Video Reference: 33_GG_CUD)

“Tower” Selector Buttons
16:43

IN THIS VIDEO...

  • The problem with the Projectiles placeholder.
  • Useful blog article on best practices*
  • A pattern for checking and creating.
SOME USEFUL LINKS...
  • *Blog - Unity3D Best Practices
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Creating When Needed
10:06
IN THIS VIDEO...
  • Ensure existing defenders' colliders mask square.
  • Calculate the world-units position of a click.
  • Calculate the nearest play-space grid centre.
  • Spawn the currently selected defender there.
Spawn Defenders To Grid
21:59

IN THIS VIDEO...

  • Place enemy spawners.
  • Decide how spawning is controlled.
  • A word about the Flow Channel*
  • Write script(s) to control spawning.

SOME USEFUL LINKS...

  • *Game Theory Applied: The Flow Channel
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Enemy Spawning & Flow
21:08

A quick note on how to improve the reliability of your code in the next video.

A Code Improvement...
00:08
IN THIS VIDEO...
  • Find a way of defenders detecting attackers.
  • Only shoot at attackers if ahead in lane.
  • Modify Shooter.cs to make this work.
  • Test that defender enter and leave “attack” state.
Shooters Detect Attackers
18:19
IN THIS VIDEO...
  • Add a sun scoreboard to the game space.
  • Star Trophy animation calls script to add sun.
  • Write StarDisplay.cs class to update scoreboard.
  • Write defender.AddStars(int amount) method.
  • Wire these scripts together.
Using Stars As Currency
14:34

IN THIS VIDEO...

  • Assign a star cost to every defender.
  • Prevent placement until you can afford it.
  • Spend stars when defenders are placed.
  • Use an enumeration to pass meaning.
  • Rough play tuning to create a challenge.
Spending Star Currency
15:16
IN THIS VIDEO...
  • Remove lose test button.
  • Create a lose collider.
  • Setup lose triggering & transition.
  • Improve lose screen.
Handle Lose Condition
09:23

IN THIS VIDEO...

  • Create a UI slider to visually show level progress.
  • Make the slider to “count down” to level end.
  • When time runs out…
  • Show “You Survived” text, and play a sound.
  • Auto-load next level.
UI Slider Level Timer
22:04
IN THIS VIDEO...
  • Tidy Spawner.cs > isTimeToSpawn()
  • Adjust colliders so attackers hit defenders.
  • Fix the gravestone animation transitions.
  • Creates prefabs of our work.
Review & Tidy Up
14:48
IN THIS VIDEO...
  • Display the defender cost on buttons.
  • Tweak the spawn frequency of attackers.
  • Adjust the health of attackers & defenders.
  • Choose amount of damage for projectiles.
  • Play and make sure it's a challenge.
Play Testing & Tuning
17:14

IN THIS VIDEO...

  • Downloading & installing Android Studio.
  • How to solve common issues.
  • Check Android Studio loads.
SOME USEFUL LINKS...
  • Android Studio
(NOTE YOU CAN CLICK THESE LINKS BELOW)
Installing Android Studio
04:44
IN THIS VIDEO...
  • Setting up Build Settings for Android.
  • Deploying to Android device*
  • Play testing on the device.

* You'll need a device connected with a USB cable.

Building To Android
10:21

IN THIS VIDEO...

  • Setup Build Settings in Unity.
  • Build to iOS simulator (Mac “needed”).
  • To build to physical device you “need” a dev kit.
  • Briefly play-test, and note improvements.
  • Share your creation with the world.
Build To iOS Simulator
08:59
IN THIS VIDEO...
  • Simplify by removing SetStartVolume.cs*
  • Destroy tagged game objects on Win condition.
  • … this also solves the “You Win” issue.
  • Add a simple STOP button to game.

* Thanks to Marko for suggesting this.

User Testing Tweaks
12:59
  • Upgrade to Unity 5.
  • About Web GL builds.
  • Build for Web GL and share.
GG Unity 5 & Web GL Sharing (Optional)
03:45
DOWNLOAD Section 7 Unity Project
00:22
Section End QUIZ
5 questions

Congratulations on getting this far!

You've now got enough Unity and C# knowledge to consider taking our 'RPG Core Combat Creator' course (either in parallel with, or after, this one).

Thank you for being our student, and enjoy the rest of this course.

Next Steps - RPG
00:12
Section 7 Wrap Up
02:54
+
Bowlmaster: 10-Pin Bowling
56 Lectures 10:46:10
Introduction to Bowlmaster
01:24
Use Unity 5.6 or Unity 2017
00:07

About the Game Design Doc

• This part of the section notes is a simple reference for the important specifications of the game. • This is just for reference, we'll refer to it as needed during the videos.

Section 8 Game Design Document
10 pages

IN THIS VIDEO...

  • Your Bowlmaster assets attached.
Your Bowlmaster Assets
1 page

IN THIS VIDEO...

  • What BowlMaster Teaches
  • Manipulating a 3D world.
  • Test driven development.
  • Introducing Unity 5.

SOME USEFUL LINKS...

  • Section Links

(Note you can click these links below)

Section 8 Notes
48 pages

IN THIS VIDEO:

  • How to keep Unity 4.6.3 as well
  • Installing the latest Unity 5
  • A brief tour of what's different
Installing Unity 5
04:12

IN THIS VIDEO...

  • Get used to 3D controls.
  • Create a bowling lane floor according to GDD.
  • Set your main camera to look down the lane.
Creating 3D Cube Floor
12:43

IN THIS VIDEO...

  • Blender is a 3D art program.
  • We need it to import .blend files.
  • It's amazingly powerful, but tricky to get started.
  • You only need to install for this course, not use.
  • www.CompleteBlenderCreator.com to learn more.

SOME USEFUL LINKS...

  • www.CompleteBlenderCreator.com

(Note you can click these links below)

How To Install Blender
05:17

IN THIS VIDEO...

  • Import our bowling pin from Blender*
  • Learn about render and collider meshes.
  • Create a pin prefab.
  • Lay-out all 10 bowling pins on the floor.
SOME USEFUL LINKS

* Find out more at www.CompleteBlenderCreator.com

(Note you can click these links below)

Import Pin From Blender
19:58

In this video...

  • Create a 3D sphere of the right size.
  • Apply a temporary texture so we can see it roll.
  • Add a sphere collider.
  • Add a Rigidbody (3D) and set properties.
  • Make the ball roll down the lane.
Some useful links...
  • Floating Bowling Balls
(Note you can click these links below)
3D Sphere As Bowling Ball
11:09

IN THIS VIDEO...

  • Create CameraControl.cs for the Main Camera.
  • Make the camera track the ball.
  • Stop when it gets close to the headpin.
Control Camera To Track Ball
08:37

IN THIS VIDEO...

  • Add Rigidbody to the pins.
  • Adjust physics so that collisions work*
  • Create new, richer pin prefab.

* We will make this more lifelike later

3D Collisions & Convex Meshes
13:36

IN THIS VIDEO...

  • Create a render texture* ready for camera output.
  • Position a top-down camera looking at pins.
  • Create a user interface panel.
  • Embed a “Raw Image” with this render texture.
SOME USEFUL LINKS

* http://docs.unity3d.com/Manual/class-RenderTexture.html

(Note you can click these links below)

Top Camera Render Texture
11:05

IN THIS VIDEO...

  • Add new UI > Panel ready for swipe gesture.
  • Set scaling & anchors for UI panels
  • Make sure it scales well.
Improve UI Scaling
06:53

IN THIS VIDEO...

  • Re-factor Ball.cs to create public Launch ()
  • Write DragLaunch.cs component for ball.
  • Wire the UI Panel's events to DragLaunch.cs
  • Test new drag control system.
Simple Touch Control System
19:23

IN THIS VIDEO...

  • Add another UI panel at bottom of screen.
  • Ensure this panel “occludes” the touch input.
  • Add two arrows, for moving ball left and right.
  • Write a simple method to allow this at start.
Adding Arrows To Nudge Ball
15:35

IN THIS VIDEO...

  • Overview the pinsetter and our end-goal.
  • Setup “swiper” bar to tidy & reset pins.
  • Add a “Swipe” animation for pin clearing.
  • About animation sub state-machines.
  • Managing pin tidying and resetting.
Animation Sub-State Machines
16:31
IN THIS VIDEO...
  • Unity doesn't support “nested prefabs”.
  • Care: the pins in Pins assembly are unlinked.
  • Adding Pin.cs to the right place(s).
  • About transform.rotation.eulerAngles.
  • Writing code to detect if pins are standing
Working Around Nested Prefabs
17:24

IN THIS VIDEO...

  • About setting-up game object communication.
  • Setup a simple UI Text display for pin count.
  • Create a PinSetter box, and PinSetter.cs
  • Continuously count standing pins.
  • Only find standing pins after ball enters box.
Counting Upright Objects
13:40

Ben encourages you to keep going, even though the lectures are long, and the subject matter is more complex.

Keep Going!
01:23

IN THIS VIDEO...

  • Use the PinSetter's trigger collider to detect ball.
  • Only start counting upright pins when ball enters.
  • Detect when pins have stopped wobbling.
  • Update pin count display to green.
  • Set lastStandingCount to -1 when settled.
Detecting Pins Have Settled 1
19:49
Detecting Pins Have Settled 2
22:01

IN THIS VIDEO...

  • Overview how Tidy & Reset will work.
  • Modify the architecture of the game.
  • Learn about sub-state machines.
  • Learn about default transitions.
  • Setup Tidy & Reset sub-states.
Sub-states & Default States
16:43

IN THIS VIDEO...

  • Add temporary UI Buttons for Reset and Tidy.
  • Write RaisePins() to lift all the standing pins up.
  • Write LowerPins() to lower them down again.
  • Test state machines work properly.
Calling Animator Helper Scripts
16:15

IN THIS VIDEO...

  • A bit more about Transform.Translate().
  • Using the Step button to slow things down.
  • The perils of moving static colliders.
  • How default animation blends can cause issues.
  • Warnings about moving motion clips around
Some Debugging Tips
17:31

Ben pre-frames the next video "Common Physics Issues", and tells you how to get the most out of it.

About The Next Video
02:21

IN THIS VIDEO...

  • A reminder about Fixed Timestep.
  • About bounciness & default materials.
  • Issues of scale & effect on Physics Settings.
  • Stopping rigidbody's passing through each other.
Common Physics Issues
21:07

IN THIS VIDEO...

  • About re-factoring your code.
  • Single Responsibility Principle*
  • Wider framework of SOLID.

Some useful links...

  • *Single Responsibility Principle

(Note you can click these links below)


Tidying & Refactoring Code
12:24
Mid Section QUIZ
5 questions

IN THIS VIDEO...

  • Read how bowling scoring works*
  • Draw an Object Communication Diagram.

Some useful links...

  • *Bowling Scoring You Tube
  • *Ten Pin Bowling Wikipedia

(Note you can click these links below)

How 10-Pin Bowling Scoring Works
06:40

IN THIS VIDEO...

  • An overview of Test Driven Development (TDD).
  • The Red > Green > Refactor loop.
  • NEVER refactor with a failing test.
Some useful links...
  • Test Driven Development
(Note you can click these links below)
Test Driven Development (TDD)
05:15

Using Unity Test Tools in Unity 5.6 or Unity 2017

Unity Test Runner
00:10
Changes To Unity's Test System
00:08

IN THIS VIDEO...

  • Setup our ScoreMaster.cs class.
  • Write our first few tests.
  • Get the first frame scoring properly.
Making Your First Test Pass
18:54

IN THIS VIDEO:

  • Go through a few more TDD loops
  • Remember Red > Green > Refactor
  • Be strict with yourself, build the discipline
  • Save a version snapshot regularly
  • Have fun!


Red > Green > Refactor
19:00

IN THIS VIDEO:

  • Finish the Control Code
  • Go through the Red > Green > Refactor loop strictly
  • Focus your failing tests on edge cases
  • Keep your ActionMaster.cs looking clean
  • Stop when you're confident it's done
  • Challenge the community to write a failing test!
Finishing Our Control Code
21:11

IN THIS VIDEO:

  • Failing tests challenge
Failing Tests Challenge
17:24

IN THIS VIDEO:

  • A brief overview of a TDD bug reporting cycle
  • Creating relevant tests from user bug reports
  • Sticking to the TDD discipline
Bug Reporting Cycle
13:32

IN THIS VIDEO:

  • Connect PinSetter.cs to ActionMaster.cs
  • Refactor PinSetter.cs to report pin fall
  • Connect PinSetter.cs to the animator
  • Remove the Tidy and Reset test buttons
  • Ensure our game controls it's self now
Wire-Up ActionMaster.cs
19:57

IN THIS VIDEO:

  • Recap the problem with the current setup
  • Use OnTriggerExit () for objects leaving colliders
  • Refactor PinSetters.cs for the new paradigm.
Using OnTriggerExit()
14:46

IN THIS VIDEO:

  • Taking the time to refactor
  • Being your own boss
  • Our current architecture
  • A target architecture
  • Keeping our tests in place
Creating A Testable Architecture
19:02

IN THIS VIDEO:

  • Removing unnecessary Unity Testing folders
  • Importing an animated gif texture
  • Quaternion.Euler() & Quaternion.Identy()
  • Using a boolean flag to prevent dragging
  • Using continuous dynamic collision detection
Tidying Before Moving On
13:13

IN THIS VIDEO:

  • Refactor your ActionMaster tests for new API
  • Refactor your code to single responsibility*

SOME USEFUL LINKS...

  • Single Responsibility Principle

(Note you can click these links below)

Refactoring Code & Tests
18:25

IN THIS VIDEO:

  • Correcting a bug due to incorrect responsibility
  • Create GameManager.cs and PinCounter.cs
  • 'Weed' PinSetter.cs into these new classes
  • Call the static ActionMaster.Next Action()
  • Repeatably test everything still works ok
A Game Manager With State
21:01

IN THIS VIDEO..

  • An overview of the challenge (and delight) ahead
  • Find and move ScoreMasterTest.cs to Editor folder
  • Temporarily disable ActionMasterTest.cs
  • Write cumulative scorer in ScoreMaster.cs
  • Set THE challenge
An Epic TDD Challenge
11:09

IN THIS VIDEO...

  • How we solved the scoring problem.
  • A reminder that it's the destination that counts.
  • How tests protect your refactoring.

“Make things as simple as possible, but not simpler”
Albert Einstein

NOTE: I use a for loop in my solution, which you can read about in the resources below. You can just as easily use a while loop.

Realtime Bowling Scoring Solution
20:15

IN THIS VIDEO...

  • What golden copies are.
  • Why they are useful for verification testing.
  • Using the [Category (“Name”)] test annotation.
  • Using binary search to find the failing test(s).
  • Commenting our code for future readability.
Golden Copy Testing
10:44
IN THIS VIDEO...
  • Rearrange your UI to make space for scores.
  • Create your scoreboard.
  • Wire-up your scoreboard.
An Array Of UI Text
16:20
IN THIS VIDEO..
  • Break your whole game!
  • Trace your bug via console.
  • Discuss handling undefined states.
  • Discuss isolating and fixing bugs.
Tracing Errors Using Console
13:27

IN THIS VIDEO...

  • How to decouple code with try{}, catch{}
  • Mainly used in file handling applications
  • Could be used in a team so one could move on
  • Isolating our ScoreDisplay.cs issues
  • Making our game fail gracefully
Try, Catch For Error Handling
05:02
IN THIS VIDEO..
  • What it means to define a class as static.
  • The perils (and advantages) of statics.
  • Why we're using static here.
  • Refactoring a class to be static.
  • Learning to accept other people's code!
Static Classes In C#
08:33

IN THIS VIDEO..

  • Monobehaviour classes are hard to test*
  • Code a testable static helper method.
  • Create our testing structure.

SOME USEFUL LINKS

  • Testing Monobehaviours

(Note you can click these links below)


Unit Testing Monobehaviours
12:59
IN THIS VIDEO...
  • public static string FormatRolls (List<int> rolls)
  • Write your own tests as you go.
  • Stick to the red-green-refactor loop.
  • Aim for 20 lines or less of beautiful code.
  • Enjoy the process & share with [SPOILER].

SOME USEFUL LINKS

  • Our Score Display Test 1

(Note you can click these links below)

Designing Your Own Tests
17:35

IN THIS VIDEO...

  • Stopping nudging ball off the floor*
  • Make ball collisions detection continuous
  • Suggestions for improvement
  • (Note you can click these links below)


Final Fixes & Finishing Off
08:41
  • Fix display of spare on last bowl.
  • Check that 0X displays properly.
  • Talk about upgrading Unity Test Tools.
Bug Fixes & Upgrading Test Tools
04:15
DOWNLOAD Section 8 Unity Project
00:22
Section End QUIZ
5 questions
Section 8 Wrap Up
01:01
5 More Sections
Requirements
  • Mac or PC capable of running Unity 2018.
  • Optional: A free download of Unity 5 to review the original content of the course.
  • A passion and willingness to learn how to code.
Description

Spring 2018 - We have started updating this entire course to the BRAND-NEW Unity 2018! The early content is in Unity 4.6, then we move to Unity 5, then Unity 2018 in TileVania. All content will be replaced from start to end starting in May.

This course started as a runaway success on Kickstarter and has gone on to become the most popular and most watched Unity course on Udemy. The course has full English closed-captions throughout.

Learn how to create video games using Unity, the world-leading free-to-use game development tool. We start super simple so you need no prior experience of Unity or coding! With our online tutorials, you'll be amazed what you can achieve right from the first moment you start the course.

Benefit from our world-class support from both other students, and the GameDevtv team who are regularly engaged in the forums and Q&A section. Go on to build several games including:

  • Laser Defender: A Top-Down Space Shooter with enemies to shoot and dodge;
  • Glitch Garden: A Tower Defense game with different tower types and enemy types, and a basic resources system;
  • TileVania: A fast-paced classic Side-Scrolling Platformer using Unity's Tilemap tool;
  • Block Breaker: A basic "Breakout" style game which introduces Unity's built in physics engine.

You will have access to a course forum where you can discuss topics on a course-wide basis, or down to the individual video. Our thriving discussion forum will help you learn and share ideas with other students. Check out our reviews to see how people love this feature.

Unity 2018 Remaster: This well-loved and highly-tuned course is taught initially in Unity 4 and then in following sections in Unity 5. This content is still incredibly valuable and relevant. As part of our ongoing commitment to our students, we are remastering the entire course in Unity 2018 to show you the newer tools that Unity has to offer.

The course is project-based, so you will not just be learning dry programming concepts, but applying them immediately to real indie games as you go. All the project files will be included, as well as additional references and resources - you'll never get stuck. There are talking-head videos, powerful diagrams, quality screencasts and more.

Oh, and it's just bigger and better than other Unity courses you will find online. See the course length and the reviews.

For each demo game you build you will follow this process...

  • Be challenged to build the entire game yourself.
  • Be shown step-by step how to build it.
  • Be challenged to apply, and re-apply your knowledge regularly.

You will get full lifetime access for a single one-off fee. The creators are qualified and experienced coders and avid gamers, so are able to explain complex concepts clearly, as well as entertain along the way. 

You will learn C#, and in turn build a solid foundation for Object Oriented Programming. By the end of the course you'll be very confident in the basics of coding and game development, and hungry to learn more.

What this course DOESN'T cover...

Whereas this course is already huge, we can't possibly cover everything in that time. Here are some things we will not be covering...

  • Performance optimization.
  • Editor plugins or modifications.
  • Physics engine modification*

* Separate mini-course to cover these this now available.

Anyone who wants to learn to create games: Unity is a fantastic platform which enables you to make production-quality games. Furthermore these games can be created for Windows, MacOS, iOS, Android and Web from a single source!

If you're a complete beginner, we'll teach you all the coding and game design principles you'll need. If you're an artist, we'll teach you to bring your assets to life. If you're a coder, we'll teach you game design principles.

Note: access to this course comes with an optional, free community site where you can share games and art assets, as well as connect with other students.

Dive in now, you won't be disappointed!

Who is the target audience?
  • Competent and confident with using a computer.
  • Artists who want to learn to bring their assets into games.
  • Some programming experience helpful, but not required.
  • Complete beginners who are willing to work hard.
  • Developers who want to re-skill across to game development.
Students Also Bought These Courses