A new evolution algorithm for the characteristic initial value problem based upon an affine parameter rather than the areal radial coordinate used in the Bondi-Sachs formulation is applied in the spherically symmetric case to the gravitational collapse of a massless scalar field. The advantages over the Bondi-Sachs version are discussed, with particular emphasis on the application to critical collapse. Unexpected quadratures lead to a simple evolution algorithm based upon ordinary differential equations which can be integrated along the null rays. For collapse to a black hole in a Penrose compactified spacetime, these equations are regularized throughout the exterior and interior of the horizon up to the final singularity. They are implemented as a global numerical evolution code based upon the Galerkin method. New results regarding the global properties of critical collapse are presented.