Make a Match-Three Puzzle Game in Unity
4.8 (159 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.
1,023 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Make a Match-Three Puzzle Game in Unity to your Wishlist.

Add to Wishlist

Make a Match-Three Puzzle Game in Unity

Make a match-three game from scratch!
4.8 (159 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.
1,023 students enrolled
Created by Wilmer Lin
Last updated 7/2017
English
Current price: $10 Original price: $95 Discount: 89% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 14.5 hours on-demand video
  • 2 Articles
  • 112 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Make their own match-three puzzle game to be deployed on PC/Mac or their mobile device!
  • Create a tile-based 2D game in Unity
View Curriculum
Requirements
  • Unity 3D version 5.4 or above (free Personal edition)
  • Mac or PC
  • OPTIONAL Photoshop or image-editing program to customize art assets (downloadable assets provided)
Description

Massive 2017 Updates!

We have created over five hours of extra lectures describing how to add additional gameplay features to our match-three game! We have also re-recorded some videos and updated the projects accordingly (Unity 5.6 used for the project files).  Check out these new features added:

  • re-skinning your game using your own Sprites
  • checking for the deadlock condition (no more available moves)
  • shuffling the Board pieces (instead of deleting them and re-filling the Board)
  • building a one-, two-, or three-star score meter
  • creating new level objectives (scored, timed, and collected) 

This course now weighs in at a 14+ hour marathon in game development.  Save weeks of work on building your own match three game. 

Join the ever growing ranks of our class and see what you can build today!

In this course, we will:

  • start with a blank Unity project and flesh out a fully working game level
  • learn some fundamental techniques for creating your own tile-based match-three 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. Create a Board class to store our tiles and game pieces
  3. Create an auto-centered orthographic camera
  4. Make a GamePiece class that can move with interpolation
  5. Setup the tiles to receive mouse input
  6. Search for matches in a two-dimensional array
  7. Handle recursive calls to clear and refill our Board 
  8. Add sound effects to game events
  9. Apply particle effects to add some punch to our graphics
  10. Making a score manager to track player progress

Join the democratization of game development! Level up your Unity 3D skills and build your own match-three game today!

When you complete the class, you should have a full set of source code as a starting point for your match-three puzzle game!


Who is the target audience?
  • Intermediate Unity developers with basic working knowledge of C# scripting
  • Unity developers interested in creating a match-three game
Compare to Other Unity Courses
Curriculum For This Course
88 Lectures
14:43:11
+
Intro
4 Lectures 12:52

The journey of a thousand miles begins with the first step!

Preview 01:06

What you need to know first!

Preview 02:30

How to use SavePoints, compare text files, and ask for help! 

Preview 04:02

In this lecture, we will create a new Unity project and discuss the various naming conventions used in our scripted components.

Preview 05:14
+
Basic Game Mechanics
17 Lectures 03:09:33

Here we setup the game board and create the background tiles.

The Game Board
12:25

Let's make an orthographic camera that stays centered on our Board.

Camera Setup
11:42

We extend the Tile component, which is the building block of our Board, in this short lecture.

Tiles
03:46

The GamePiece class describes the playable components that can be moved around the Board to make the matches.

Game Pieces
14:59

Let's create methods on the GamePiece to allow it to move around the Board.

GamePiece Movement
16:26

Here we explore some basic interpolation types to make the movement seem a little more natural.

Interpolation
10:42

Here we add the ability to interpret our mouse clicks and drags over the game board's tiles.

Mouse Input
10:45

Let's code the basic ability to swap a GamePiece with its neighbor.

Switching GamePieces
14:42

Here we create a basic method on the Board class to detect matching pieces.

Finding Matches
10:07

Here we make some functions that wrap around FindMatches that help us find matching pieces in the horizontal or vertical direction.  We also make a simple Highlight method to help us visual the matching process.

Horizontal and Vertical Matches
11:02

We use the newly created FindMatchesAt method in conjunction with our SwitchTiles to test if we make a match when we swap GamePieces.  

More Matches
12:40

We create the ClearPieceAt method, which will be used to remove matching GamePieces from our Board.

Clearing GamePieces
07:05

FillBoard
09:13

Once we have cleared out some GamePieces, we need to collapse the columns to fill in any "holes" that form.

Collapsing Columns
10:36

We need to collapse our Board recursively so we can clear out any "chain reaction" matches that form.

Clear and Collapse Routine
12:54

Let's adjust our collapse speed so that it varies according to the distance the GamePiece falls.

Collapse Adjustments
08:18

Now that our columns are collapsed to fill in the gaps, we modify the FillBoard method to fill in the partially empty Board.

Refilling the Board
12:11
+
Extending Gameplay
17 Lectures 02:48:21

Let's make a special Tile that acts like a hole or obstacle.

Obstacle Tiles
13:24

Let's make tiles that can be "broken." 

Breakable Tiles
14:42

We create some simple geometric particle effects to represent clearing GamePieces or breaking Tiles.

Clear and Break Effects
12:57

We create a ParticleManager so we can trigger our ParticleSystems on certain game conditions.

Particle Management Part 1
10:24

We trigger our ParticleSystems when we clear the GamePieces or break the Tiles.

Particle Management Part 2
06:48

We add an array of GamePieces that we can use to customize the starting configuration of our Board.

Starting GamePieces
10:39

Bomb Pieces Part 1
10:36

Bomb Pieces Part 2
09:02

Dropping Bombs
14:02

ChangeColor Method
05:04

Chaining Bombs
04:57

Bomb FX
06:05

Color Bombs
11:43

Collectibles Part 1
10:05

Collectibles Part 2
13:59

Collectibles Part 3
05:36

Blockers
08:18
+
Game Management
12 Lectures 01:55:25

We create a generic singleton class that can be used for our manager scripts.

Preview 07:42

Who's keeping score?  

The ScoreManager Part 1
09:48

Let's invoke the methods on the ScoreManager in the GamePiece, GameManager and Board classes.

The ScoreManager Part 2
08:31

Let's make a simple Image that can cover our screen and fade in and out to help with transitions.

ScreenFader
08:40

Let's make a manager class to keep track of our game's sequence of events.  Everything has a beginning, middle and end!

The GameManager Part 1
12:48

We can count our moves and lose the game now.

The GameManager Part 2
08:45

We lay out some UI elements to make a small message box.

The Message Window Part 1
08:07

We create two classes to control our new dialog box, the RectXformMover to move the window on and off screen and the MessageWindow class to control the text displayed.

The Message Window Part 2
13:17

Now we put everything together from the last two lessons and make the GameManager talk to the Message Window.


The Message Window Part 3
11:16

Let's trigger the message window if you win or lose the game.

Winning the Game
07:01

We make a manager class to store and playback sounds.

The SoundManager Part 1
10:44

Let's finish the SoundManager!

The SoundManager Part 2
08:46
+
Mobile Devices
6 Lectures 43:37

Let's tweak our game so it's more friendly for a mobile device.

Mobile Devices (iOS/Android)
05:32

Download Xcode and get your Apple Developer account setup.  We need to provision our devices before we go back to Unity.


Note: this lesson does not contain a Save Point.

Setup for iOS
07:54

Download Android Studio and setup your device drivers to be debuggable via USB.

Note: this lesson does not contain a Save Point.  Your individual system settings may vary depending on platform and SDK version.

Setup for Android
08:41

Here we modify the Player Settings in Unity to accommodate the needs of our mobile platform.

Unity Player Settings (iOS/Android)
06:40

We build our game for iOS!


Note: You will need to add your iOS Development Team ID from your Apple Developer account in order to Build the project from the SavePoint.

Build and Run (iOS)
09:49

We build the game for Android!


Note: you must choose the paths to your Android SDK and Java SDK in the Unity > Preferences in order to build your project from the SavePoint.

Build and Run (Android)
05:01
+
Updates
31 Lectures 05:51:08

Here is the final project with comments added in-line.

Code Comments
00:02

Reskinning
15:09

In this Update, we add a small delay before the EndGameRoutine in the main game loop to wait for the Board to finish its refill.

WaitForBoardRoutine
09:23

Board Updates
06:25

BoardDeadlock Part1
12:48

BoardDeadlock Part 2
12:27

BoardDeadlock Part 3
08:04

BoardShuffler Part 1
10:32

BoardShuffler Part 2
14:06

LevelGoal
12:20

LevelGoalScored
13:24

ScoreMeter UI
10:07

ScoreStar
09:27

ScoreMeter
14:12

LevelGoalTimed
09:13

Timer UI Part 1
13:36

Timer UI Part 2
14:04

Time Bonus Part 1
09:54

TimeBonus Part 2
12:37

Time Bonus Part 3
08:00

CollectionGoal
08:43

Level Goal Collected
13:27

Board SwitchTilesRoutine Update
09:02

CollectionGoalPanel
15:10

UIManager Part 1
15:20

UIManager Part 2
09:59

UIManager Part 3
19:30

Message Window Update Part 1
06:27

Message Window Update Part 2
11:20

Message Window Update Part 3
14:09

Message Window Update Part 4
12:11
+
Bonus
1 Lecture 01:46

More tutorials!

Bonus lecture
01:46
About the Instructor
Wilmer Lin
4.8 Average rating
610 Reviews
6,590 Students
4 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 aspiring gamedevs learn the craft of programming and designing video games using Unity3D, Maya and Photoshop.