
A quick overview of the course and our first project.
A quick overview of the programming concepts you'll be learning and what you'll be making in this Section.
Instructional video on how to download and install Unity, the program used for this course.
How to download and install Visual Studio Code and the extensions that the instructor will be using for this course.
The basics of how to navigate Unity's interface.
Learn the basics of creating and understanding a GameObject and its components, as well as how to position it in your scene and adjust your camera.
Learn how to create and properly name your first C# script.
Learn the proper names for different types of enclosers: <>, (), [], {}
Learn how to create a simple script that prints "Hello World" to the console.
Learn how to use variables and the different data types.
Begin to learn about floating point math with Pi.
Learn about what sine waves are, how they work and why we were getting near-zero values in our last lesson.
Learn about 'magic numbers' and how to replace them with variables in your code.
Learn about the 'public' and 'private' access modifiers and why we use them.
Apply what you learned in the previous lecture (on access modifiers) to our script.
Learn about the member access operator "." and how it works.
Learn how to modify the cube's scale using our script.
Learn about the differences between declaring a variable and defining it.
Learn about scope to better understand when and why variables are accessible.
Apply what we've learned about scope, declaration, and definition of variables to our script.
Learn about conditional statements and comparison operators.
Apply what we've learned about conditionals to constrain our piVal variable.
Apply what you learned in the previous lecture about constants.
Learn about the Random.Range method.
Apply our knowledge from the last lecture and use Random.Range to change the starting scale of our cube.
Learn about one of the twelve principles of animation, Squash & Stretch, which we will be using in our project.
Learn about another one of the twelve principles of animation, Slow In & Slow Out, which we will be using in our project.
Apply what we've learned in the previous two lectures about the principles of animation to our project.
Learn how to create a prefab, what it can do and why it's useful.
Apply our knowledge from the previous lecture on prefabs to our project.
Learn about materials and use them to put the finishing touch on this section's project.
A quick overview of the programming concepts you'll be learning and what you'll be making in this Section.
Using what you've learned in the previous section, set-up your scene so that it's ready for our new project.
In this 2-part challenge video, you'll write the PiTranslate script, which behaves similarly to PiAnimate from the previous Section.
Confused about how PiTranslate was written? Here's a BONUS supplementary video to explain a few of the changes between PiTranslate and PiAnimate.
Learn the similarities between Position and localScale and the difference between Relative and Absolute changes in position.
Apply what you've learned about changing position to translate (move) our cube along the y axis.
Learn about the main purposes for including comments in your code with regular Comments and Multi-Line Comments.
Combine regular and Multi-Line Comments to create a “Comment Switch”; allowing you to toggle bits of your script on and off at will!
With our new knowledge about Comments in Code, let's tidy up our PiTranslate script before calling it complete and creating the Cube Spawner in the next part of this Section.
Learn about how you can use Unity's Instantiate method to spawn copies of GameObjects.
Learn how to dynamically load in Assets and Instantiate them in Unity.
Instantiate has multiple method signatures which can be used to spawn Objects with certain properties instantly defined.
What are Quaternions? This video provides a cursory glance at a frighteningly complex topic, just enough to understand how to use them in Unity.
You've learned about the Instantiate method, you've learned about Position, and Quaternions (kind of) now it's time to put it all together and make a cube spawn entirely using code!
Loops allow you to repeat individual lines, or even entire sections of code! Perhaps one of the most useful loop structures you will learn about is the "For" loop, which allows you to perform a fixed number of repetitions.
This video demonstrates how you can simplify: "x = x + 1" to "x += 1" to "x++" because Programmers love to create short-hand for frequently used bits of code! (I say that so often, I should come up with a short-hand for it)
Using what you've learned about for loops & increment/decrement operators, you'll modify your cube spawner so that it spawns more than one cube.
Learn how to use the GetComponent function in Unity.
Learn the difference between absolute and relative positioning, the latter of which we will be using in our cube spawner.
Learn how to use the Instantiate method to return a value and learn how to apply this to our row of cubes.
Apply what you've learned about GetComponent and Sine Curves to begin the process of offsetting the movement of our oscillating cubes.
Learn about the difference between integer division and float division, as well as how to 'cast' a variable.
Apply what you know about For Loops to nest one loop within another, which we will use to change our line of cubes into a field of cubes.
Using both our "i" and "j" For Loop variables, we will offset our cubes so that they are properly displayed as a full field.
We'll create two new variables, magnitude and separation, which we can use to better control the look of our oscillating cube field.
Learn how to create an ideal camera view while the game is running, and then use that camera's position data so that your game uses that camera view as the default.
Learn about the different components of a light in Unity and how we can use those components to create a rim light for our scene.
Now that we know about directional lights, let's take a look at the other two types of lights we use: "Point" and "Spot" lights. We will learn how they differ from one another and how we can make use of them in our scenes.
Using what we know about cameras and lighting, let's add the final bit of polish to our oscillating cube field.
In this challenge, we'll use what we've learned to add individual lighting to each of our solids in our oscillating cube field.
In this challenge, we'll try swapping out our cubes in our oscillating field for a different shape.
In this challenge, we'll have our cubes squash and stretch in time with the oscillation of the field.
In this challenge, we will take our oscillating cube field and make it an oscillating cube of cubes.
Get a look at the projects we'll be building in Section 4 of Programming with Pi where we focus on Rotations in Unity. We'll start with a "Shaky-Cam" effect, add on more pronounced shake effects, then finish with a spectacular nested-ring effect made of spinning cubes!
A quick overview of the programming concepts you'll be learning as well as the set-up for this section's project.
We'll learn the basics of what a class is and then create our own class for the sine functions we created in the previous sections.
Learn about the various parts that comprise a method in C#, as well as the relevant terminology we will be using as we move forward in this section.
CORRECTION: Arguments and Parameters are NOT the same thing as this video may lead you to believe. An argument represents data passed to a method, while a parameter represents the possible data that can be passed to a method as defined in the method signature. For more information, please see the CORRECTION link in the External Resources for this lecture.
Together we'll write our Increment and GetSine methods for our Sine Class.
Learn what a class is, the terminology we use, and why we use them.
Learn about inheritance, an incredibly important programming concept which will help us to understand how and why we will be removing Monobehaviour from our Sine Class.
Learn about why we are removing Monobehaviour and then remove it from your Sine Class.
Learn about the System Serializable Tag in Unity.
Building on the previous videos in this section, we will begin creating our ShakyCam script.
Visual Studio Community is now the preferred IDE for Unity, so this video will cover how to update to the latest version of Unity and install Visual Studio Community. Please note that Visual Studio Community 2019 has since been made available since the release of this video and should be usable for all intents and purposes, although some menus may look slightly different than those seen in upcoming videos.
Learn how to use the Sine class to manipulate the Camera's position in the scene, and define a position origin for the Camera.
We'll update our Sine Class with a function which applies a magnitude multiplier to "value", then use it to modify the Camera's x and y position.
Learn the difference between Pitch, Roll, and Yaw and how they apply to manipulating rotation in Unity.
Apply your understanding of Rotation in Unity to manipulate the camera's rotation along the x and y axes in Unity.
Learn about the three fundamental logical operators, AND, OR, and NOT. See how they can be used in combination with one another to evaluate more complex logical conditions.
Let's add the concept of a limited duration to our Sine Class to allow for effects which don't go on forever, and most importantly to enable the concept of "decay" in the following lecture.
Learn how to reduce Magnitude to zero over the course of the duration and add the GetSineDuration to our Sine Class.
Let's give the camera a big shake on it's y axis with a new Sine Class variable that utilizes the GetSineDuration method we just wrote.
Get an introduction to the Input Class in Unity and see how it can be used to detect various forms of input to make your software truly interactive. Also, a brief overview of the KeyCode Enumerator.
Apply your knowledge of the Input Class to trigger the camera shake impulses on command, but first let's add a Reset method to our Sine class for effects which have limited duration.
Challenge yourself to set the camera rolling on it's Z-Axis. Adding this type of rotation is very similar to what we covered in the previous lecture, so see how much you can accomplish without relying on the Challenge Slide.
Learn how to manipulate the Camera component with script in Unity. As an example, see how you can set the camera's field of view in script.
Learn how to add a shake effect onto the Camera's Field of View to round out the Camera Shake section of Programming with Pi!
We begin to create the final, and most elaborate effect in the Programming with Pi course; the Orbiting Rings! Brace yourself for a series of Challenges as we set up the Scene.
We construct the Cube which will make up the rings of the effect and do initial script setup for its Orbit Behavior.
Improve your Sine Class with the addition of the GetCosine method. This will allow us to use a single Sine variable for creating circular orbits. Lastly, we Prefab the Cube so it can be spawned from a script.
A quick video to setup the OrbitingCubeSpawner Behaviour on the Camera.
Set up a For Loop in OrbitingCubeSpawner to spawn as many cubes as you wish; then adjust their “position” within a circle to get them evenly distributed into a ring.
Complete the OrbitingCubeSpawner by adding in a zOffset to distribute the cubes across multiple rings.
Pat yourself on the back; you’ve completed Programming with Pi! Take a moment to look back on all the topics we’ve covered, then share your creations with other students.
I recently participated in the "GMTK Game Jam 2019" and had the opportunity to use the Sine Class for a couple UI effects. This video is less of a "how-to" and more of a "here's what I did", but it should give you all the info you need to implement these effects for your own 2D elements (both for UI and Sprites in Unity!)
Check out the Resources for a copy of the "TitleScale" script as well as a link to play the game we made.
Improve your Sine Class with a mirror-compliment to the Increment method. Also, includes an optimization to the regular Increment method.
For anyone interested in additional (Free!) learning material prepared by me, I have created this article to link to a few additional resources
Learn how to make your projects beautiful with the power of Pi!
Make eye-catching portfolio pieces
Get a foundation in C# scripting
Learn Unity 3D basics
Learn concepts which can be applied to other game engines / programming languages
This course will give you a solid foundation programming in C#; you don’t need any prior experience! But, if you’re a novice or even an experienced programmer who has yet to behold the beauty of programming with Pi, this course is still for you!
You’ll get a thorough understanding of Programming with PI so that you’ll be ready to apply some sine wave magic to your own projects, in Unity and beyond. The skills you learn in this course can be applied from 3D object manipulation (as depicted in the course) to 2D Sprites and even animating UI elements!
No matter what field of programming you are interested in, this course will help you to make some visually appealing projects that will make fantastic portfolio pieces.
Course Logistics:
Got a question? Ask away! Chances are, others will have similar questions, so I may record BONUS videos in response.
Finished? This course is considered complete. Bonus videos may still be added, but all core lectures have been posted.
Support? Help is available to any and all students from the course creator; Attila "Gabriel" Branyiczky.
COMPLETE Course Content Breakdown:
Unity Related:
Downloading and installing Unity
IDE layout basics
Random.Range
Prefabs
Instantiate
Resources.Load
Rotations
GetComponent
Lights in Unity
[System.Serializable]
Input GetKey, and KeyCode
C# Related:
Data Types
Access Modifiers
Member variables
Scope
Conditional Statements
Constants
Code Comments
For Loops
Increment and Decrement Operators
Integer vs Float Division
C# Methods
Creating a Class
Inheritance
Logical Operators
Additional Learning Topics:
Sine Waves
Animation Principles: Squash and Stretch
Pitch, Roll, and Yaw