Adding collision detection to the game framework