How to do "Underwater Bubbles"?

Godot Version



Hi all,

And yes you read that right “underwater bubbles” :stuck_out_tongue:. I was showing my brother the progress of the project thus far and he said "how about making some bubbles when your character is underwater, and I said “damn you and your good ideas”. So, I was trying to think about it last night and I need your opinions, would the “bubble” be a good candidate for a packed scene and instantiating them? Or, would there be a better idea? Also, how would I go about making the bubbles appear at random intervals, I would need some sort of timer just don’t know how to implement that, luckily for me the water is at a constant height so getting rid of them shouldn’t be a problem. I can’t use a Godot timer because that would be regular. Remember I don’t want anyone to just give me code just a general idea through English as this is a learning exercise.

As always any help you can give is greatly appreciated!


I think a particle will do great, high lifetime randomization. Maybe as a oneshot with a timer to release bubbles.

Randomizing timers isn’t too difficult. They have to be set to oneshot then _on_timeout can randomize the wait time and start it again

func _on_timer_timeout() -> void:
    $Timer.wait_time = randf_range(1.0, 16.0)
1 Like

You know just is just so crazy that it might work :sunglasses:.

I had no idea you could do that - thankyou very much for that information and also for the one shot/particles.

I am going to have a lot of fun trying to implement this :stuck_out_tongue:.

Much regards.

1 Like

I love particles :smiling_imp:

I find blend mode “Add” to be really really nice with particles too

1 Like