while playing fuse-tetris, i just found a BAD thing: a recursivly blocking situatation that effectively kills my gravity algorithm. wow. this one is frustrating. as i have no idea how to solve this. normally, the blue piece "B" could just fall down one unit. but because i check if it really can slide down by checking the whole playfield for obstacles, it cannot. reason is because of the red piece R that - works as an obstacle. R by itself COULD fall, if bevore B would have been fallen one unit. --> endlessly recursive blocking. deadlock. argh. (luckily, my algo just continues. but still - i have got "hanging in the sky" blocks. dislike that.)
R is holding up B, but B is holding up R. I think the algorithm used in LJ solves this. First flood-fill each connected region with a unique RegionID number. Each frame, do this: Flood-fill those regions that have landed (that is, anywhere there is a not-landed block on row 1 or a not-landed block above a landed block) with a special RegionID that means landed. Move all blocks down that are not in a landed region. The red region below regions R and B would be given separate RegionIDs. Extending this to the typical Lumines-like situation where the falling piece and gravity can interact with the playfield at the same time is an exercise for the reader.
@tepples: thanks! the problem is, that currently i'm handling each piece as an object and i am using the playfield as a lookup table/cache for fast floodfill only. but i think that method with the "floor-connected"/landed region will help me out. finally that may remove these strange rare situations i encountered in my clone where tiles kept hanging in the sky.. as i never played lumines, that sentence "where the falling piece and gravity can interact with the playfield at the same time" makes no sense to me. is there a youtube video or may you please explain? sounds interesting!
Lumines was the first Puyo-style game I played that allowed the player to drop falling pieces on top of a chain reaction in progress to extend it. (Klax and Tetris Attack were similar, but they didn't have Tetris-style controls.) In Lumines, chain reactions happen very slowly (one step per two measures of music, or about one every four seconds), and once the game gets fast, the player is expected to build on existing chains to increase the combo meter. You can download Luminesweeper and play game left to see what I mean.