Tetris - Collision / Radar sensor with the terominoes

I’m still attempting to reproduce the Tetris game using the Blender Engine and some Python and here is another problem.

I want the tetrominoes to stop when they hit the ground or another tetromino part.
With a one-mesh tetrominoe, I get some corner collisions like this : http://imgur.com/zbymPRE or sided-collisions problems.
So I try to do it with radar sensors and four cubes (who form the shape of the tetromino) but when one of the four cubes detect something, it’s not necessarily the case of the three others, so some of them go on down.
The cubes don’t use the actor property so they can’t detect each other.
(Is there a way to stop the three other cubes when one is detected ?)
If I tried to put the radar sensors on the ground, I think I would have the same kind of problem.

So I wanted to ask if you have any ideas about how to manage that correctly. (I don’t want to have the whole code/solution/.blend on a plate; I have to try by myself first ^^’)


It makes more sense to use the position information of each block, because in this instance the rules of tetris make it easier for you :slight_smile:
Check the height of each block and when they match, check if they are adjacent, etc.

Indeed, a physics based approach sounds a bit like too much overhead. The original Tetris game model is pretty simple and is mainly processed in a few lines of code.

If you still want to use physics, I suggest to add some detecting objects (sensor type) below the blocks:

[  block   ]

This way the detector signals when there is something blocking. Keep in mind in Tetris, the blocks stop in the raster.

[this does not process complete-line-detection]

Well, since I add the cubes from another layout and that they use the same python code, it seems hard to me to check the positions of all the cubes and still, I have to find a way to make them all stop when they ‘hit’ or ‘detect’ the ground and I don’t see another ‘simple’ way than physics and sensors.