Note: although the lectures were recorded with an older version of Unity, the final project runs well on Unity 2019
Unity 3D has quickly become one of today's fastest growing game development tools. Learn more about this fascinating game engine in our project-based class, where we build a Tetris-style puzzle game from scratch. If you have some basic knowledge of C# and Unity, take your skills to a new level by exploring this short course in remaking a classic arcade game.
Note: although the lectures were recorded with an older version of Unity, the final project runs well on Unity 2019
Unity 3D has quickly become one of today's fastest growing game development tools. Learn more about this fascinating game engine in our project-based class, where we build a Tetris-style puzzle game from scratch. If you have some basic knowledge of C# and Unity, take your skills to a new level by exploring this short course in remaking a classic arcade game.
If you have completed a few basic tutorials on Unity and have some basic knowledge of C# (variables, loops, data structures, etc.),this class is for you. We take a project-based approach, where we follow one game from start to finish.
We will:
start with a blank Unity project and flesh out a fully working game.
learn some fundamental techniques for creating your own puzzle game
follow several C# scripts line-by-line and learn how to organize our scripts logically and cleanly
port our application to iOS and Android. See your glorious game run on a mobile device.
What is covered:
Setup our project settings and environment
Breaking down the gameplay mechanics
Creating a Board class to store our data
Laying out user interface items
Creating our game piece Shape class
Setting up our master GameController class to handle logic
Apply Time to our game logic
Script to handle player input
Add sound effects to game events
Apply particle effects to add some punch to our graphics
Making a score manager to track player progress and high scores
Enhance our game with extra features to make it a polished experience
Join the democratization of game development. Level up your Unity 3D skills and build your Tetris-style game today.
Unity has quickly become one of today's fastest growing game development tools. Learn more about this fascinating game engine in our project-based class, where we build a Tetris-style puzzle game from scratch!
If you have some basic knowledge of C# and Unity, take your skills to a new level by exploring this short course in remaking a classic arcade game.
Prerequisites: Before you begin this course you should have:
Mac or PC capable of running Unity
Unity 5 or above (Personal edition)
Basic knowledge of Unity's interface
Some basic working knowledge with C# language
Optional: Photoshop or any image-editor to customize art assets
Note: the final project has been tested with Unity 2019.1 and works great!
What is the target audience?
Beginner to intermediate developers who want to continue exploring Unity 3D
Game artists who want to improve their coding skills in C#
If you have completed a few basic tutorials on Unity and have some basic knowledge of C# (variables, loops, data structures, etc.), this class is for you! We take a project-based approach, where we follow one game from start to finish.
We will:
start with a blank Unity project and flesh out a fully working game.
learn some fundamental techniques for creating your own puzzle game
follow several C# scripts line-by-line and learn how to organize our scripts logically and cleanly
What is covered:
Setup our project settings and environment
Breaking down the gameplay mechanics
Creating a Board class to store our data
Laying out user interface items
Creating our game piece Shape class
Setting up our master GameController class to handle logic
Apply Time to our game logic
Script to handle player input
Add sound effects to game events
Apply particle effects to add some punch to our graphics
Making a score manager to track player progress and high scores
Enhance our game with extra features to make it a polished experience
Join the democratization of game development! Level up your Unity 3D skills and build your Tetris-style game today!
Before you take this Course, you need:
Each lecture of this course will build on the last. So you should be able to follow straight through these lessons if you are going quickly in about a day or a weekend.
Periodically there will be "save points," where you can download an entire project in case you lose your way or you want to pick up from a particular point and start in the middle.
Look for the Lectures marked Save Point so you download the project from the Downloadable Resources tab.
Flashbacks from 1984 to present day!
An overview of our project structure. Download the TetrisCloneStart.zip file if you want a project with the folders already created!
This slide shows our sample project organization structure.
Download the TetrisCloneStart.zip file if you want a project with the folders already created!
Here we will introduce the core classes of our game:
Here we set up our Board class, which will draw an empty grid and store our shapes... eventually.
Create an empty grid square in Photoshop or use the one from the Downloadable Resources tab.
We will need to setup some camera settings to see our game board.
We create a prefab from our empty square sprite, so it can be replicated to form a grid.
Let's create a method to draw the empty grid.
Here we cover a few ground rules for how our methods and variables are named for this project.
Finally we get our empty grid drawn on screen!
Let's create a two-dimensional array to store our landed Shapes.
Our game board and Board class is complete.
Let's start exploring Unity's User Interface system. If you already have experience with the UI system and don't want to go through the section, skip to Save Point III and resume the course in the next section.
Exploring our first Canvas object in Render Mode: Overlay.
Here we will start layout out our user interface.
We use Layout Groups to space the icons in our lower panels automatically!
We add a border to our game board using a nine-slice sprite.
We add a Canvas in Render Mode: World space to add a background.
This Save Point includes our roughed out but non-functional interface along with our rudimentary Board class.
Make sure you are in Pivot mode when setting up the Shape Prefabs in the next lecture.
We lay out our seven Shape prefabs that will be our main game pieces.
This Save Point has our Board, Shape, GameController and Spawner classes created, but has no game mechanics implemented yet.
Move and Rotate our Shape
Here we being to explore Unity's Time class, which will help us create events that happen at an interval.
We add some methods to the Board class to check for boundaries.
Here we store any Shapes that land in our Board's grid array.
Here we will explore the Input class and the Input Manager, where we will setup our "virtual axes" for MoveRight, MoveLeft, MoveDown and Rotate.
We'll briefly examine the Input.GetKey and Input.GetKeyDown methods and refactor our code to use a PlayerInput method in our GameController class
Here we finish setting up all four inputs: MoveRight, MoveLeft, MoveDown and Rotate. We should be able to manipulate our active shape once we are finished!
We add the ability to clear rows when they are complete!
Let's check for our Game Over condition!
Our first iteration of the game is complete!
We setup our SoundManager class, which will help us playback sound effects and music.
We setup an AudioSource for our BackgroundMusic audio and configure the SoundManager to control music playback.
Let's add some sound effects.
We add some sounds when we move our Shapes.
Let's add some sounds when we clear a row.
We add some vocal effects for different events in our game.
We've added some basic background music and sound effects to our game!
We create a class that lets us toggle between two alternate icons.
We add the toggle that allows us to switch our default rotation direction.
We create a Pause button to pause to the game.
We create a Screen Fader to help transition our game to its starting and end states.
Here we finish our Screen Fader and learn how Coroutines work.
We have added some UI enhancements to our project!
The ScoreManager class will help the game keep score of player progress.
Let's add some UI to show off our score!
We finish the Lines and Level indicator in the lower left of the user interface!
Our game can now keep score!
We add a helper "ghost" to preview where our Shape will land. Definitely a great gameplay feature!
We modify the Spawner class to give us a three-Shape preview of things to come.
We finish the Shape queue!
We add a small button to hold a Shape for layaway!
We finish the Hold button.
We have finished our Ghost, Shape Queue and Hold button features!
We learn to jazz up our game with some particle effects!
Let's make a simple glowing square effect that we can re-use through our game.
We add the vertical streak effects to accompany our Glowing Square effect.
No glowing square is complete without sparkles!
The Particle Player class allows you playback multiple ParticleSystems at runtime.
Let's modify our Glowing Square effect to show off an effect when a whole row clears!
Let's make the Row Glow effect work for more than one row at a time!
We modify the Glowing Square effect to trigger an effect whenever a Shape lands on the board.
We swap out our Rounded Block sprite to give our game a little more style. We also add lots of ParticleSystem goodies to help make our background come alive!
Let's add some more ParticleSystem goodies and trigger them with events in our scripts!
Let's build our game as a Standalone application!
Let's convert our PC and Mac Standalone project to use either iOS or Android!
We connect our Android device and prepare it to receive our Unity game!
Here we setup the device for Developer Options and edit Unity's Preferences to point to our SDKs.
In this lesson, we will set up our Developer account, download Xcode and then prepare our iOS device for building!
We Build and Run for Android! Finally!
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.