Bubble shooter type game

Hi guys,

Everyone knows these type games: http://www.bubbleshooter.net/

I was wondering what the logistics are behind such a game and if anyone knew any tutorials or documentation that would point me in the right direction of creating such a game?

Much appreciated!

It’s a very broad question. But you will need four basic elements that I can tell.
The bubble class. A sphere collider trigger will do.
The bullet class. A sphere collider rigidbody will do.
The shooter class. Any type of input that will allow you to shoot and aim the bullet.
The wall class. A box collider allowing the bullet to ricochet off of it.

Then of course you will need a scoring manager also a manger for your bubbles and that should be it.

1 Like

How would I go about generating the bubbles/spheres at the start though? I imagine these games work in a way so that whenever it randomly generates the balls, the game should always be “finishable”? (for lack of a better word)

I think I can imagine how to create the whole shooting and actually dissapearing / gain score when there are 3 or more of the same colour spheres… although when it comes to pre selecting which balls will come to shoot, or generate the balls at the start… I can not think properly…

Thanks for your thoughts! I do realize this is a very broad question, but I am just looking for logistics behind the game… not a step by step plan of how to get there :wink: I have tried searching for some information about these games written in flash or another language but can literally not find any info about it! any other help / ideas are very welcome!

2 Likes

How would I go about generating the bubbles/spheres at the start though? I imagine these games work in a way so that whenever it randomly generates the balls, the game should always be “finishable”? (for lack of a better word)

Well you can go about this one or two ways. First, obviously you need to set a level limit or number which upon destrpying so many bubbles, the level is cleared.

I think I can imagine how to create the whole shooting and actually dissapearing / gain score when there are 3 or more of the same colour spheres… although when it comes to pre selecting which balls will come to shoot, or generate the balls at the start… I can not think properly…

Just create a few balls you can access and cycle thru, or you can just create a new one each time you want to shoot. Look and “pooling” and or Instantiate(). If you are building for mobile you will want to use pooling.

And your welcome.

1 Like

Definitely recommend pooling your balls cough… sorry!

Take a look at PoolManager for this - makes it easy.

Don’t know what others think, but whenever I play these type of games I swear it’s cheating me by spawning the balls I don’t need! So maybe there’s underlying code there that makes it harder for a player… looks at what coloured balls are in the scene then limits the chances of one of those colours spawning.

I recently wrote a bubble shooter in Unity. You can download the source code at: GitHub - javierquevedo/bubble-shooter-unity3d: A bubble shooter clone game for Unity3D. Written in C#.

If you have any questions just let me know :slight_smile:

hi
If you can explain a bit about how to do this code
thanks

how can i get the destroyed bubble if we click on texture