Bubble Shooter Game in Unity: Part 11

moving the grid endlessly

So what if we wanted to pick the code from the last tutorial in this series and make the grid scroll endlessly down the screen? I’d need to add new rows of balls, and in order to do that I’d have to flip the grid upside down (mainly because since the beginning of this series I’ve been using a grid that starts at the bottom of the screen.)

Read More

Bubble Shooter Game in Unity: Part 10

moving the grid

In order to move the grid down the screen we only need to make a few adjustments to the code. Before we had a variable controlling the number of visible rows at the beginning of the game; but with a scrolling grid you don’t need that. The grid should be entirely visible now, with a fixed gap of empty rows at the bottom of the grid which will add an initial distance between visible cells and the shooters (as well as the necessary empty rows which will need to add the player’s bullets which do not create an immediate match.)

Read More

Bubble Shooter Game in Unity: Part 9

multiple shooters

So what if you want to use multiple shooters? The class I wrote for the ray cast shooter can be easily updated so we can use as many shooters as we want in the game.
I’ll place five shooters at the bottom of the screen, and for the sake of this tutorial, each shooter will now have a fixed color type, so the color won’t change after a shot.
(Although you could easily keep the existing logic that handles that in the touch up handler, who knows, it might make things interesting to have each shooter select its color randomly and keep changing its color randomly after every shot.)

Read More

Bubble Shooter Game in Unity: Part 8

using a hex grid

As I mentioned before, a bubble shooter game looks better with a hex grid, specially when the targets are circles. A square grid populated with circles should not run matches diagonally, because it looks weird. So with a square grid you can have a maximum of four neighbors for each cell (diagonal neighbors look too far away when using circles). But with a hex grid you can have up to six neighbors.

Read More