I can check if 2 objects are colliding. But when to objects travel 10 pixels per frame and they are 2 pixels square then there is a change I won't detect it. How should I check if there is a collision or not and set the 2 objects in the corect position of where they will collide?

Thanx in advance!