Make a Tetris-style Puzzler in Unity
4.8 (135 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.
907 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Make a Tetris-style Puzzler in Unity to your Wishlist.

Add to Wishlist

Make a Tetris-style Puzzler in Unity

Build a tile-based puzzle game with C# and Unity
4.8 (135 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.
907 students enrolled
Last updated 5/2017
English
Current price: $10 Original price: $95 Discount: 89% off
2 days left at this price!
30-Day Money-Back Guarantee
Includes:
  • 10 hours on-demand video
  • 14 Articles
  • 51 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Make their own Tetris-like puzzle game to be deployed on Mac or PC!
View Curriculum
Requirements
  • Unity 3D version 5 or above (FREE versions)
  • Mac or PC
  • OPTIONAL Photoshop or image-editing program to customize art assets (otherwise, use the downloadable art assets provided)
Description

Update 6/2016:  New lessons on porting our application to Android have been added!   See your glorious game run on a mobile device!

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

What is covered:

  1. Setup our project settings and environment
  2. Breaking down the gameplay mechanics
  3. Creating a Board class to store our data
  4. Laying out user interface items
  5. Creating our game piece Shape class
  6. Setting up our master GameController class to handle logic
  7. Apply Time to our game logic
  8. Script to handle player input
  9. Add sound effects to game events
  10. Apply particle effects to add some punch to our graphics
  11. Making a score manager to track player progress and high scores
  12. 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!

Who is the target audience?
  • This course is meant for beginning to intermediate students with some familiarity with Unity and C#
  • This course is NOT meant as an introduction to Unity; though we will walk you step-by-step through the project, do NOT use this as your first course in Unity
  • Some working knowledge of C# is necessary; do NOT use this as an introduction to C#
  • If you are a beginning to intermediate game developer interested in improving your skill set, this course is for you!
Students Who Viewed This Course Also Viewed
Curriculum For This Course
97 Lectures
09:56:17
+
Introduction
4 Lectures 08:51

Unity 5 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 5
  • Unity 5 (Free Version)
  • Basic knowledge of Unity's interface
  • Some basic working knowledge with C# language
  • Optional: Photoshop or any image-editor to customize art assets

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:

  1. Setup our project settings and environment
  2. Breaking down the gameplay mechanics
  3. Creating a Board class to store our data
  4. Laying out user interface items
  5. Creating our game piece Shape class
  6. Setting up our master GameController class to handle logic
  7. Apply Time to our game logic
  8. Script to handle player input
  9. Add sound effects to game events
  10. Apply particle effects to add some punch to our graphics
  11. Making a score manager to track player progress and high scores
  12. 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!

Preview 01:13

Before you take this Course, you need:

  • Mac or PC capable of running Unity 5
  • Unity 5 (Free Version)
  • Basic knowledge of Unity's interface
  • Basic working knowledge with C# language
  • Optional: Photoshop or any image-editor to customize art assets


Preview 02:10

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.


Preview 01:34

Flashbacks from 1984 to present day!

Preview 03:54
+
Project Setup
3 Lectures 03:34

An overview of our project structure. Download the TetrisCloneStart.zip file if you want a project with the folders already created!

Creating Your New Project
03:30

This slide shows our sample project organization structure.

Project Folders
00:00

Download the TetrisCloneStart.zip file if you want a project with the folders already created!

Save Point 1
00:04
+
The Game Board
10 Lectures 34:49

Here we will introduce the core classes of our game:

  • Board
  • Shape
  • Spawner
  • GameController
Preview 02:26

Here we set up our Board class, which will draw an empty grid and store our shapes... eventually.

Preview 03:36

Create an empty grid square in Photoshop or use the one from the Downloadable Resources tab.

Create the EmptySquare Sprite
05:05

We will need to setup some camera settings to see our game board.

Camera Setup
05:14

We create a prefab from our empty square sprite, so it can be replicated to form a grid.

EmptySquare Prefab
04:02

Let's create a method to draw the empty grid.

DrawEmptyCells Method
02:09

Here we cover a few ground rules for how our methods and variables are named for this project.

Naming Conventions
03:25

Finally we get our empty grid drawn on screen!

Finishing DrawEmptyCells
06:29

Let's create a two-dimensional array to store our landed Shapes.

Grid Storage
02:21

Our game board and Board class is complete.

Save Point 2
00:02
+
User Interface
7 Lectures 39:12

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.

Preview 01:51

Exploring our first Canvas object in Render Mode: Overlay.

The Overlay Canvas
03:46

Here we will start layout out our user interface.

Text and Images
11:56

We use Layout Groups to space the icons in our lower panels automatically!

Layout Groups
10:12

We add a border to our game board using a nine-slice sprite.

Nine-sliced Border
04:04

We add a Canvas in Render Mode: World space to add a background.

The World Space Canvas
07:19

This Save Point includes our roughed out but non-functional interface along with our rudimentary Board class.

Save Point 3
00:04
+
Core Components
7 Lectures 32:29

We lay out our seven Shape prefabs that will be our main game pieces.

Shape Prefabs
06:46

The Shape Class
05:42

The GameController Class
02:38

Referencing Other Game Objects
09:31

The Spawner Class
04:42

The Vectorf Class
03:06

This Save Point has our Board, Shape, GameController and Spawner classes created, but has no game mechanics implemented yet.

Save Point 4
00:04
+
Game Mechanics
10 Lectures 01:10:50

Move and Rotate our Shape

Spawning Shapes
04:22

Here we being to explore Unity's Time class, which will help us create events that happen at an interval.

The Time Class
02:53

We add some methods to the Board class to check for boundaries.

Checking Board Boundaries
05:51

Here we store any Shapes that land in our Board's grid array.

Storing Shapes in the Grid
04:49

Here we will explore the Input class and the Input Manager, where we will setup our "virtual axes" for MoveRight, MoveLeft, MoveDown and Rotate.

Player Input
12:40

We'll briefly examine the Input.GetKey and Input.GetKeyDown methods and refactor our code to use a PlayerInput method in our GameController class

More Player Input
05:07

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!

Finishing Player Input
12:53

We add the ability to clear rows when they are complete!

Clearing Rows
09:59

Let's check for our Game Over condition!

Game Over
12:14

Our first iteration of the game is complete!

Save Point 5
00:02
+
Sounds
7 Lectures 43:48

We setup our SoundManager class, which will help us playback sound effects and music.

The SoundManager Class
05:32

We setup an AudioSource for our BackgroundMusic audio and configure the SoundManager to control music playback.

Background Music
12:38

Let's add some sound effects.

Sound Effects
09:57

We add some sounds when we move our Shapes.

Input Sounds
06:53

Let's add some sounds when we clear a row.

Clear Row Sounds
04:12

We add some vocal effects for different events in our game.

Vocal Effects
04:33

We've added some basic background music and sound effects to our game!

Save Point 6
00:03
+
UI Enhancements
6 Lectures 43:01

We create a class that lets us toggle between two alternate icons.

Icon Toggle
06:29

We add the toggle that allows us to switch our default rotation direction.

Rotation Direction Toggle
07:01

We create a Pause button to pause to the game.

Pause Button
10:58

We create a Screen Fader to help transition our game to its starting and end states.

Screen Fader
06:50

Here we finish our Screen Fader and learn how Coroutines work.

Coroutines
11:39

We have added some UI enhancements to our project!

Save Point 7
00:04
+
Scoring
4 Lectures 24:10

The ScoreManager class will help the game keep score of player progress.

The ScoreManager Class
07:07

Let's add some UI to show off our score!

Scoring User Interface
04:31

We finish the Lines and Level indicator in the lower left of the user interface!

Leveling Up
12:31

Our game can now keep score!

Save Point 8
00:01
+
Gameplay Extras
6 Lectures 52:44

We add a helper "ghost" to preview where our Shape will land.  Definitely a great gameplay feature!

Ghost Shape
10:25

We modify the Spawner class to give us a three-Shape preview of things to come.

Shape Queue (Part 1)
06:01

We finish the Shape queue!

Shape Queue (Part 2)
13:58

We add a small button to hold a Shape for layaway!

Shape Holder (Part 1)
11:23

We finish the Hold button.

Shape Holder (Part 2)
10:54

We have finished our Ghost, Shape Queue and Hold button features!

Save Point 9
00:03
4 More Sections
About the Instructor
Instructor Wilmer Lin
4.7 Average rating
485 Reviews
6,009 Students
3 Courses
Game Developer / Visual Effects Artist

Wilmer Lin is a 3D and visual effects artist with over fifteen years of industry experience and has trained several hundred artists over the course of a decade. Now an independent game developer, Wilmer helps new game developers learn the craft of programming and designing video games using Unity3D, Maya and Photoshop.