4.81 out of 5
4.81
489 reviews on Udemy

Make a Match-Three Puzzle Game in Unity

Make a match-three game from scratch!
Instructor:
Wilmer Lin
2,859 students enrolled
English [Auto-generated]
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

Note: though much of the course was recorded with an older version of Unity, the final project has been updated to use Unity 2018.3.  Though there are minor differences in the UI, you should be able to complete the course using Unity 2018.

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 15+ 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!

Intro

1
Introduction

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

2
Prerequisites

What you need to know first!

3
How to Use this Course

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

4
Setup and Naming Conventions

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

Basic Game Mechanics

1
The Game Board

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

2
Camera Setup

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

3
Tiles

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

4
Game Pieces

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

5
GamePiece Movement

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

6
Interpolation

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

7
Mouse Input

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

8
Switching GamePieces

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

9
Finding Matches

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

10
Horizontal and Vertical Matches

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.

11
More Matches

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

12
Clearing GamePieces

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

13
FillBoard
14
Collapsing Columns

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

15
Clear and Collapse Routine

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

16
Collapse Adjustments

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

17
Refilling the Board

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

Extending Gameplay

1
Obstacle Tiles

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

2
Breakable Tiles

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

3
Correction: BreakTileRoutine
4
Clear and Break Effects

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

5
Particle Management Part 1

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

6
Particle Management Part 2

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

7
Starting GamePieces

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

8
Bomb Pieces Part 1
9
Bomb Pieces Part 2
10
Dropping Bombs
11
ChangeColor Method
12
Chaining Bombs
13
Bomb FX
14
Color Bombs
15
Collectibles Part 1
16
Collectibles Part 2
17
Collectibles Part 3
18
Blockers

Game Management

1
The Singleton pattern

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

2
Note: Persistent Singletons
3
The ScoreManager Part 1

Who's keeping score?  

4
The ScoreManager Part 2

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

5
ScreenFader

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

6
The GameManager Part 1

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

7
The GameManager Part 2

We can count our moves and lose the game now.

8
The Message Window Part 1

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

9
The Message Window Part 2

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.

10
The Message Window Part 3

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


11
Winning the Game

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

12
The SoundManager Part 1

We make a manager class to store and playback sounds.

13
The SoundManager Part 2

Let's finish the SoundManager!

Mobile Devices

1
Mobile Devices (iOS/Android)

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

2
Setup for iOS

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.

3
Setup for Android

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.

4
Unity Player Settings (iOS/Android)

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

5
Build and Run (iOS)

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.

6
Build and Run (Android)

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.

Additional Features

1
Code Comments

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

2
Reskinning
3
WaitForBoardRoutine

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.

4
Board Updates
5
BoardDeadlock Part1
6
BoardDeadlock Part 2
7
BoardDeadlock Part 3
8
BoardShuffler Part 1
9
BoardShuffler Part 2
10
LevelGoal
11
LevelGoalScored
12
ScoreMeter UI
13
ScoreStar
14
ScoreMeter
15
LevelGoalTimed
16
Timer UI Part 1
17
Timer UI Part 2
18
Time Bonus Part 1
19
TimeBonus Part 2
20
Time Bonus Part 3
21
CollectionGoal
22
Level Goal Collected
23
Board SwitchTilesRoutine Update
24
CollectionGoalPanel
25
UIManager Part 1
26
UIManager Part 2
27
UIManager Part 3
28
UIManager Part 3 Correction
29
Message Window Update Part 1
30
Message Window Update Part 2
31
Message Window Update Part 3
32
Message Window Update Part 4

Boosters

1
Boosters Introduction
2
Booster User Interface
3
Booster Class Part 1
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.8
4.8 out of 5
489 Ratings

Detailed Rating

Stars 5
387
Stars 4
87
Stars 3
12
Stars 2
1
Stars 1
1
9b2d790f32e26e7e4313ecb28ecd1760
30-Day Money-Back Guarantee

Includes

16 hours on-demand video
12 articles
Full lifetime access
Access on mobile and TV
Certificate of Completion