RaSGooL adlı üyeden alıntı: mesajı görüntüle
JavaScript bildiğini düşünerek attım. Kodda anlaşılmayan bir kısım yok bence.
Senin için basite indirgiyorum.

/*
Rect = {x, y, w (width), h(height)}
*/
function intersect(rect1, rect2) {
  if (rect1.x < rect2.x + rect2.w &&
    rect1.x + rect1.w > rect2.x &&
    rect1.y < rect2.y + rect2.h &&
    rect1.h + rect1.y > rect2.y) {
    // collision detected!
  } else {
    // no collision
  }
}
hocam bunun javascript bilip bilmemekle alakası yok burda rect.x yazılmış bu ne anlama geliyor??