Biped robots have been a focus of research for decades, aiming to assist or replace humans in specific tasks. Studying these robots is crucial for understanding human locomotion and enhancing control strategies for prosthetic and orthotic limbs. However, design challenges include: (1) instability due to passive joints at the single foot-ground contact; (2) variations in configuration when transitioning between walking phases-under-actuated during single support and over-actuated during double support; (3) multiple degrees of freedom (DOFs); and (4) interaction with unknown environments. This work addresses offline computational optimal control strategies for zero-moment point (ZMP)-based biped robots. By applying computational optimal control, we examine the impact of constraints on locomotion, such as maintaining the swing foot parallel to the ground and keeping hip motion at a constant height. A finite difference method translates the infinite-dimensional optimal control problem into a finite-dimensional suboptimal one, followed by parameter optimization to derive suboptimal trajectories under various constraints.