Bubble Shooter advice needed

Get help using Construct 2

Post » Tue Oct 08, 2013 8:27 pm

You are welcome. Make sure you make the sensor sprites smaller than the bubble sprites to avoid "collision overflow". A sensor sprite about half the size will do just fine.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Wed Oct 16, 2013 10:36 am

Hi again @jojoe, still cannot find a solution for destroying unconnected group of bubbles, in this moment i have a 3d array which contains the bubbles and zones without bubbles (i store x and y positions of a bubble, and 1 if there is a bubble, and 0 if there is not a bubble). The problem is that i don't know how to destroy the bubbles which are isolated, like the blue ones from this screenshot:



I've tryied a solution with filling the white spaces with another objects and them move them down, and when they colides with bubbles to destroy the bubbles, in the case from the screenshot it is working like a charm, but in other complicated cases there are destroyed another bubbles which are not disconnected.

If anyone have a solution, please, let me know :)
B
5
Posts: 10
Reputation: 270

Post » Wed Oct 16, 2013 10:56 am

hey! I have a similar issue, is there a method to do this? C2 seems like a great engine apart from not being able to solve simple problems like this.

thanks!
B
2
Posts: 1
Reputation: 152

Post » Wed Oct 16, 2013 11:08 am

I believe that there must be a solution for this, i'm also waiting to find it :D
B
5
Posts: 10
Reputation: 270

Post » Wed Oct 16, 2013 8:02 pm

A solution is do a flood fill from the top row of bubbles. Mark the the top bubbles and then mark all the connected bubbles. After that any unmarked bubbles are not connected.

Here is an example of the concept with squares:
https://dl.dropboxusercontent.com/u/5426011/examples19/floodfillconnected.capx
Click to add/remove squares. They will be destroyed if not connected to the center square. This can be adapted any way you like. Just change the function that marks the connected objects.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Fri Oct 18, 2013 9:47 am

Hi @R0J0hound, a similiar thechnique i've started to implement, seems to work, thank you for your answer.
B
5
Posts: 10
Reputation: 270

Previous

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, ST314, TheRealDannyyy, tunepunk and 35 guests