I am currently in the process of making a game which involves a whole bunch of mini games, one of which is somewhat similar to Tetris. I have already designed a way for the blocks to spawn randomly, move down the screen, move left and right, and rotate. However, I have so far been unable to find a way to detect whether the blocks have collided with each other, and when they should stop moving. For the movement of the blocks I have used an event that tells the block to every X seconds move down 40 pixels (I am using a grid based system for the Tetris section and each square on the grid is 40px, 40px), and the same when left and right are pressed (move left 40 pixels, move right 40 pixels). I am also using families to spawn the blocks, as each of the different pieces are actually made of 3 or 4 separate sprites that are in a family and move in unison. It would be greatly appreciated if anyone knew of a way to detect when the blocks are touching each other so that we know when they should stop moving downwards
Cheers, Kukukoke