#### AiNaKa

##### Member

Here is some of my collision code:

GML:

```
///collision
if not place_empty(x,y)
{
if place_empty(x-8,y)
{
x -= 8;
}
if place_empty(x+8,y)
{
x += 8;
}
if place_empty (x,y-8)
{
y -= 8;
}
}
```

GML:

```
///drop
if global.drop > 30
{
if place_empty(x,y+1)
{
y += 8
global.drop = 0;
}
else
{
solidify = true;
}
}
```

So far, I've only coded "I" pieces and "T" pieces. The I pieces function completely as intended, but the T pieces get screwed up when trying to land them properly as shown in this screenshot. I can't seem to figure out why this is happening, nor can I fix it. I've also tried solutions using collision_rectangle, but it gets even worse and ends up glitching outside of the box.