[SOLVED]problem with my tetris

netoxinaa

Member
Hello there, I'm trying to do a tetris by my own and I came around this problem which I can't solve.
I have all of my tetris pieces as objects, and everytime once an instance gets created, it goes every second down, but it leaves like a sprite rail which doesn't have to do, just like in the image I attached.

This is my tetris pieces' create event :
Code:
active_piece = true;
alarm[0] = room_speed * 1;
The alarm event:
Code:
y++;
alarm[0] = room_speed * 1;
and the Step event:
Code:
if (active_piece == true){
    if (keyboard_check_pressed(vk_right)){
        x+=1;
    }
    if (keyboard_check_pressed(vk_left)){
        x-=1;
    }
}
All of this code is managed by a parent object.
 

Attachments

If you don't have anything refreshing the background, then whatever you draw to it doesn't get cleared after every frame, which results in the smear effect.
 
Top