We prove a number of results on the determinacy of $\sigma$-projective sets of reals, i.e., those belonging to the smallest pointclass containing the open sets and closed under complements, countable unions, and projections. We first prove the equivalence between $\sigma$-projective determinacy and the determinacy of certain classes of games of variable length ${<}\omega^2$. We then give an elementary proof of the determinacy of $\sigma$-projective sets from optimal large-cardinal hypotheses. Finally, we show how to generalize the proof to obtain proofs of the determinacy of $\sigma$-projective games of a given countable length and of games with payoff in the smallest $\sigma$-algebra containing the projective sets, from corresponding assumptions.