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:
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:
What is covered:
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!
Here we setup the game board and create the background tiles.
Let's make an orthographic camera that stays centered on our Board.
We extend the Tile component, which is the building block of our Board, in this short lecture.
The GamePiece class describes the playable components that can be moved around the Board to make the matches.
Let's create methods on the GamePiece to allow it to move around the Board.
Here we explore some basic interpolation types to make the movement seem a little more natural.
Here we add the ability to interpret our mouse clicks and drags over the game board's tiles.
Let's code the basic ability to swap a GamePiece with its neighbor.
Here we create a basic method on the Board class to detect matching pieces.
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.
We use the newly created FindMatchesAt method in conjunction with our SwitchTiles to test if we make a match when we swap GamePieces.
We create the ClearPieceAt method, which will be used to remove matching GamePieces from our Board.
Once we have cleared out some GamePieces, we need to collapse the columns to fill in any "holes" that form.
We need to collapse our Board recursively so we can clear out any "chain reaction" matches that form.
Let's adjust our collapse speed so that it varies according to the distance the GamePiece falls.
Now that our columns are collapsed to fill in the gaps, we modify the FillBoard method to fill in the partially empty Board.
Let's make a special Tile that acts like a hole or obstacle.
Let's make tiles that can be "broken."
We create some simple geometric particle effects to represent clearing GamePieces or breaking Tiles.
We create a ParticleManager so we can trigger our ParticleSystems on certain game conditions.
We trigger our ParticleSystems when we clear the GamePieces or break the Tiles.
We add an array of GamePieces that we can use to customize the starting configuration of our Board.
We create a generic singleton class that can be used for our manager scripts.
Who's keeping score?
Let's invoke the methods on the ScoreManager in the GamePiece, GameManager and Board classes.
Let's make a simple Image that can cover our screen and fade in and out to help with transitions.
Let's make a manager class to keep track of our game's sequence of events. Everything has a beginning, middle and end!
We can count our moves and lose the game now.
We lay out some UI elements to make a small message box.
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.
Now we put everything together from the last two lessons and make the GameManager talk to the Message Window.
Let's trigger the message window if you win or lose the game.
We make a manager class to store and playback sounds.
Let's finish the SoundManager!
Let's tweak our game so it's more friendly for a mobile device.
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.
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.
Here we modify the Player Settings in Unity to accommodate the needs of our mobile platform.
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.
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.
Here is the final project with comments added in-line.
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.
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.