Question: how to group connected cubes separately?

Hey there,

I'm new to Corona SDK with a little history with GameSalad. I'm right now trying to re-make a game that I made with GS and like to improve it through the process.

Here is the link to sample code:

http://dl.dropbox.com/u/17208657/puzzle.zip

To summarize the current status: there are cubes with different colors falling down and they stack onto each other. I'd like to group cubes seperately if there are 3 or more of the same type (with same color) are connecting each other (like match3). You can see in the sample code that the ones matching the criteria have an alpha value of 0.5.

For example, if there are two groups of red cubes, I want them to have separate ids. Right now, I can destroy the cubes when player clicks a cube but that's kinda messy and slow downs the process. I want to define the groups before any action.

Any ideas? Thanks in advance :)

anyone?

Hi there,

Your question is still a bit vague. So if you want help then

1) Explain in more detail. Why do you want them grouped together? What needs to happen to them in groups?
2) Related to 1: make a nice clear schematic drawing, host the image somewhere yourself and include it in your post. I'm going to be honest here: I don't mind skipping over someone's questions here, and providing a quick answer if I see a solution, but downloading and unzipping is too much of a hassle for my limited timeframe.

That being said, can't you just insert the 3 cubes you want into a displaygroup? And use a table that keeps track of the existing displaygroups?

Thomas

views:1949 update:2012/2/7 8:40:54
corona forums © 2003-2011