clean version, lines/dots with collision detection