Need help with bubble pop game

Hi

I’m fairly new at Unity and would like to create a little game for my daughter. I’d like to create a game in which bubbles come on screen from bottom and fly up and you have to pop them by touching. Now, I know how to make score, timer and some basic power ups, but I’ve no idea on how to make bubbles appear and how to program them so they burst on touch. I was thinking maybe destroy object on touch? If someone could help me or even link me to tutorial, I’d be very grateful.

OK, you’ll find lots of tutorials using the “Learn” link at the top of this page. You really need to do some of those if you haven’t already. Unless you’re an experienced programmer already, you won’t be able to just dive right in and create even a simple game like this without going through some tutorials. (And maybe not even then — even an experienced coder will need to at least learn how to get around in the UI, and learn the basic Unity concepts like game objects, prefabs, project vs. scene hierarchy, etc.)

You’ll make the bubbles appear by instantiating a bubble prefab at a random location. You’ll pop them by detecting a hit (perhaps using OnMouseDown), and then either playing a pop animation and destroying the object (with a delay so it waits for the animation to complete), or by destroying the bubble immediately and instantiating a separate pop-animation object (which destroys itself when the animation is done).

Just take it step by step (where step zero is, do some tutorials!), and you’ll get there! This is a totally doable first project. Just let us know where you get stuck, one piece at a time, and be sure to include what you tried, what result you got, and how that result was different from what you wanted.

Good luck!

Thank you for the reply. I was actually working on a tetris clone just to learn and came to the instantiating tetrominos and then spawning them and thought that could actually work, but wasn’t completely sure so it helps that I got some kind of confirmation, I was stuck on those two problems and now I think I’ll be able to finish nicely. Thanks!

1 Like