We examine skyrmions interacting with a square array of obstacles under ac drives applied in one or two directions. For a single direction of ac driving, we find that the Magnus force in conjunction with the obstacle interactions can create elliptical skyrmion orbits of increasing size, leading to localized phases, chaotic phases, and translating or ratcheting orbits. Under two ac drives that are out of phase by 90° and applied in two directions, the skyrmions form localized commensurate orbits that encircle an integer number of obstacles, similar to the electron pinball effect observed for electrons in antidot lattices. As a function of ac amplitude, Magnus force strength, and obstacle size, we find that chaotic scattering regimes and directed motion can emerge even in the absence of asymmetry in the substrate. The directed motion follows different symmetry axes of the periodic substrate, and we observe a variety of reversed ratchet effects. The Magnus force in the skyrmion system produces a significantly larger number of directed motion regimes than are exhibited by overdamped systems. We discuss how these results could be used to move skyrmions in a controlled way for possible applications.