2D Collision Sample 1: Rectangle
This sample shows a simple technique for constraining motion and collision detection in 2D.
Introduction
Games do not need to be complex to be fun and interesting. Obstacle avoidance games consist of a character and some objects that are on a crash course towards each other. The player must avoid the oncoming objects.