Programming with Pi
4.6 (9 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
55 students enrolled

Programming with Pi

Make beautifully smooth effects with everyone's favorite irrational number; π
4.6 (9 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
55 students enrolled
Last updated 4/2019
Current price: Free Original price: $44.99 Discount: 100% off
30-Day Money-Back Guarantee
This course includes
  • 5 hours on-demand video
  • 2 articles
  • 23 downloadable 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 3,000+ courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Bring static sprites or 3D models to life with easy-to-reuse code
  • Create lively User Interface menus

  • Increase immersion with top-notch camera-shake techniques

  • Basic computer literacy
  • Use of a computer which can run Unity 2018

Learn how to make your projects beautiful with the power of Pi!

  • Create smooth UI effects, immersive Camera-Shake, squishy sprites, and more!
  • Get a foundation in C# scripting
  • Learn Unity 2018 basics
  • Learn concepts which can be applied to other game engines / programming languages
  • Make eye-catching portfolio pieces

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!

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!


  • New Lectures are added EVERY Friday!
  • PLUS: Got a question? Ask away! Chances are, others will have similar questions, so I may record BONUS videos in response which may go up at any time IN ADDITION to the regular weekly Lecture.
Who this course is for:
  • People who want to make beautiful code-driven animated effects
  • People looking to learn some C# fundamentals
  • Experienced coders who have not yet learned of the beauty and practicality of the Sine Curve
Course content
Expand all 77 lectures 05:06:15
+ Introduction
1 lecture 03:06

A quick overview of the course and our first project.

Preview 03:06
+ Creating a Colorful Cube Field
32 lectures 01:45:35

A quick overview of the programming concepts you'll be learning and what you'll be making in this Section.

Preview 00:38

Instructional video on how to download and install Unity, the program used for this course.

Installing Unity [Instructional]

How to download and install Visual Studio Code and the extensions that the instructor will be using for this course.

Installing Visual Studio Code and Extensions [Instructional]

The basics of how to navigate Unity's interface.

Preview 08:52

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.

Intro to GameObjects

Learn how to create and properly name your first C# script.

Your First C# Script Part 1

Learn the proper names for different types of enclosers: <>, (), [], {}

Brackets [Instructional]

Learn how to create a simple script that prints "Hello World" to the console.

Your First C# Script Part 2

Learn how to use variables and the different data types.

Variables and Data Types

Begin to learn about floating point math with Pi.

Variables 1: Floating Point Math

Learn about what sine waves are, how they work and why we were getting near-zero values in our last lesson.

Intro to Sine Waves [Instructional]

Learn about 'magic numbers' and how to replace them with variables in your code.

Variables 2: Magic Numbers

Learn about the 'public' and 'private' access modifiers and why we use them.

Access Modifiers [Instructional]

Apply what you learned in the previous lecture (on access modifiers) to our script.

Variables 3: Public/Private [Challenge]

Learn about the member access operator "." and how it works.

Member Variables [Instructional]

Learn how to modify the cube's scale using our script.

Modifying Scale

Learn about the differences between declaring a variable and defining it.

Declaration and Definition

Learn about scope to better understand when and why variables are accessible.

Scope [Instructional]

Apply what we've learned about scope, declaration, and definition of variables to our script.

Declaration & Definition Revisited

Learn about conditional statements and comparison operators.

Conditional Statement [Instructional]

Apply what we've learned about conditionals to constrain our piVal variable.

Looping in the Range of 2π [Challenge]
Constants [Instructional]

Apply what you learned in the previous lecture about constants.

Defining Tau [Challenge]

Learn about the Random.Range method.

Randomize [Instructional]

Apply our knowledge from the last lecture and use Random.Range to change the starting scale of our cube.

Randomizing piVal [Challenge]

Learn about one of the twelve principles of animation, Squash & Stretch, which we will be using in our project.

Principles of Animation: Squash & Stretch [Instructional]

Learn about another one of the twelve principles of animation, Slow In & Slow Out, which we will be using in our project.

Principles of Animation: Slow In and Slow Out [Instructional]

Apply what we've learned in the previous two lectures about the principles of animation to our project.

Applying the Principles of Animation

Learn how to create a prefab, what it can do and why it's useful.

Prefabs [Instructional]

Apply our knowledge from the previous lecture on prefabs to our project.

Duplicating Our Cube

Learn about materials and use them to put the finishing touch on this section's project.

Coloring Our Cubes

Check your understanding on content covered in this section. Topics will include:

- Unity Basics (The Interface, GameObjects, Prefabs)

- Variables (Data Types, Access Modifiers, Constants)

- Floating Point Math (Pi, Sine, Random Range)

Section 1 Quiz
10 questions
Upcoming Content
+ Mesmerizing Oscillating Cubes
33 lectures 02:42:54

A quick overview of the programming concepts you'll be learning and what you'll be making in this Section.

Section Introduction and Goals

Using what you've learned in the previous section, set-up your scene so that it's ready for our new project.

New Scene Set-Up [Challenge]

In this 2-part challenge video, you'll write the PiTranslate script, which behaves similarly to PiAnimate from the previous Section.

Writing PiTranslate [Challenge]

Confused about how PiTranslate was written? Here's a BONUS supplementary video to explain a few of the changes between PiTranslate and PiAnimate.

Explaining PiTranslate [Bonus!]

Learn the similarities between Position and localScale and the difference between Relative and Absolute changes in position.

Changing Positions [Instructional]

Apply what you've learned about changing position to translate (move) our cube along the y axis.

Translating our Cube

Learn about the main purposes for including comments in your code with regular Comments and Multi-Line Comments.

Code Comments [Instructional]

Combine regular and Multi-Line Comments to create a “Comment Switch”; allowing you to toggle bits of your script on and off at will!

Making a Code Switch [Instructional]

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.

Cleaning up PiTranslate [Challenge]

Check your understanding on PiTranslate before moving on to the second part of this Section.

PiTranslate Mini Quiz
5 questions

Learn about how you can use Unity's Instantiate method to spawn copies of GameObjects.

Instantiate Basics [Instructional]

Learn how to dynamically load in Assets and Instantiate them in Unity.

Resources.Load [Instructional]

Instantiate has multiple method signatures which can be used to spawn Objects with certain properties instantly defined.

Instantiate with Position and Rotation [Instructional]

What are Quaternions? This video provides a cursory glance at a frighteningly complex topic, just enough to understand how to use them in Unity.

Rotations in Unity [Instructional]

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!

Spawn a Cube [Challenge]

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.

About “For” Loops [Instructional]

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) 

Increment and Decrement Operators [Instructional]

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.

Spawn a Row of Cubes [Challenge]

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.

Relative Cube Spawning

Learn how to use the Instantiate method to return a value and learn how to apply this to our row of cubes.

Instantiate Returns a Value

Apply what you've learned about GetComponent and Sine Curves to begin the process of offsetting the movement of our oscillating cubes.

Offsetting Oscillating Cubes

Learn about the difference between integer division and float division, as well as how to 'cast' a variable.

Integer vs. Float Division [Instructional]

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.

Nesting Loops

Using both our "i" and "j" For Loop variables, we will offset our cubes so that they are properly displayed as a full field.

Oscillating CubeField

We'll create two new variables, magnitude and separation, which we can use to better control the look of our oscillating cube field.

Adding Separation and Magnitude [Challenge]

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.

Align the Camera in Scene View [Instructional]

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.

Create a Rim Light with Directional Lighting [Instructional]

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.

Point and Spot Lights in Unity [Instructional]

Using what we know about cameras and lighting, let's add the final bit of polish to our oscillating cube field.

Finishing Up

Check your understanding on the second half of Section 3 before finishing with some tricky challenges!

Section 3 Quiz #2
6 questions

In this challenge, we'll use what we've learned to add individual lighting to each of our solids in our oscillating cube field.

Give Solids a Light Source [Challenge]

In this challenge, we'll try swapping out our cubes in our oscillating field for a different shape.

Use Different Solids [Challenge]

In this challenge, we'll have our cubes squash and stretch in time with the oscillation of the field.

Scaling AND Translation [Challenge]

In this challenge, we will take our oscillating cube field and make it an oscillating cube of cubes.

Make It 3D [Challenge]
+ Immersive Camera Shake
11 lectures 34:40

Section 4 is in development. While I originally created Section 4 at the same time as when I originally released Programming with Pi Section 1, I have taken the opportunity to improve and expand the Section's content. Videos should be releasing weekly from now until the end of the section.

Section 4 Coming!

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!

Section 4 Preview

A quick overview of the programming concepts you'll be learning as well as the set-up for this section's project.

Section Goals and Setup

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.

Creating the Sine Class

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.

Methods & Functions in C#

Together we'll write our Increment and GetSine methods for our Sine Class.

Writing Our First Methods [Challenge]

Learn what a class is, the terminology we use, and why we use them.

C# Classes [Instructional]

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.

Inheritance [Instructional]

Learn about why we are removing Monobehaviour and then remove it from your Sine Class.

Removing Monobehaviour

Learn about the System Serializable Tag in Unity.

System.Serializable [Instructional]

Building on the previous videos in this section, we will begin creating our ShakyCam script.

Creating ShakyCam