The other way that I've always liked, just a restatement of the good Doctor's code for the sake of legibility, is: collide=1 if shipX>platformX+imgPlatform:width() then collide=nil else if platformX>shipX+imgShip:width() then collide=nil else if shipY>...