Join Kelley Hecker for an in-depth discussion in this video Spawn a special piece, part of Build a Match 3 Game with Unity.
- [Voiceover] We've determined what type…of special piece to spawn, and where to spawn it.…Now we just need to create the piece…and clear all valid matches after clearing the match.…In the clear all valid matches function,…in the grid script, after clearing the match,…we'll check if we should spawn a special piece.…If the special piece type is still the default value,…which is count, it means we shouldn't spawn a special piece.…If the piece type is something other than count,…we'll destroy the empty piece,…and then spawn a new special piece.…
The color of the row and column clearing special piece…should match the color of the pieces that were matched.…Since we know all the pieces in the match…are the same color,…we can just check the color of the first piece,…and set color of the new special piece to that.…If this new piece is a row or column clearing piece,…and if the matched piece is colorable,…then we set the color of the new special piece…to the color of the matched pieces.…The row clear and column clear pieces…
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
Unity 5: Build a Real-Time Strategy Gamewith Dan Violet Sagmiller3h 46m 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?
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.