The Matrix in the Matrix trilogy (1999-2003)
Neo (Keanu Reeves) and his companions are meat batteries used by a machine race that has taken over the Earth, waging war on humanity and enslaving the population. The few humans who are awakened from the dream-rich stasis that the machines have kept them in must empower humankind to break the mental shackles and take back their shattered planet. There's not a lot of survivors (or hope) in this film as the machines are so entrenched. But humans find a way to fight back both inside and outside of the Matrix.