Join Kelley Hecker for an in-depth discussion in this video Create an empty piece, part of Building a Match 3 Game with Unity.
- [Voiceover] One of the key things our grid needs…to be able to do is refill itself when pieces are cleared.…The first step to achieving that is creating…an empty piece type, so we can have…empty spaces in our grid.…Drag the Normal Piece prefab into the scene…from the Prefabs folder.…Our Empty Piece type will be…a stripped-down version of this.…With the Prefab selected, go to the Game Object menu…and click Break Prefab Instance.…This way, we won't modify our normal piece prefab.…
Go ahead and rename the game object…to Empty Piece Prefab.…Remove the movable piece and color piece components…in the Inspector.…Inside the Prefab, delete the Piece object,…so we're left with just the root game object.…Drag this to the Prefab folder to create a new Prefab,…and then delete the object from the scene.…Open up the Grid script.…We're going to add a new piece type called Empty…to our Piece Type enum.…
Save that, and go back to the scene.…Click on the Grid object.…In the Piece Prefabs array, change the size to two.…Element zero is going to be our empty piece type.…
Game developer Kelley Hecker covers topics like creating a grid-based game board, using inheritance to create different types of game pieces, adding obstacles and new levels, detecting matches and clearing pieces, and implementing a user interface complete with a score screen. By the end of the course, members will have a completed game and learned new techniques to apply to their next Unity project.
- Creating a game board grid
- Creating and scripting game pieces
- Filling the board
- Creating obstacles
- Swapping pieces
- Matching pieces
- Clearing obstacles and pieces
- Creating new levels
- Creating the user interface: HUD, game over screen, etc.
Skill Level Intermediate
Unity 5: 2D Essential Training (2015)with Jesse Freeman3h 22m Intermediate
Creating Mobile Games with Unitywith Kelley Hecker1h 12m Intermediate
Build a Real-Time Strategy Game with Unity 5with Dan Violet Sagmiller3h 47m Intermediate
1. The Game Board
2. Make a Move
3. Special Piece Types
4. Level Types
5. User Interface
Next steps1m 29s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.