"Portal 2" has both a single-player and cooperative gameplay mode, but these modes share the same fundamental gameplay mechanics. In both modes, players solve physics-based puzzles by creating sets of portals that they can walk through.
Players have a "portal gun" with which they can create a single blue portal and a single orange portal in different locations simultaneously. Players can then pass through these portals. Creating a new portal replaces the previous portal of that color. Players must use this ability to bypass a series of obstacles. Some areas have added elements like tractor beams and colored gels that affect the player's movement speed.
In the single-player mode, players follow a story campaign that places them in the role of Chell, the protagonist of the prequel. As with the original game, Chell is attempting to escape her imprisonment in the ruins of the Aperture Science building. The cooperative mode requires two players to play together. They take on the roles of test robots P-Body and Atlas; the level designs in the cooperative mode require the players to work together to get past obstacles and challenges. Both modes feature an ending to the game once the players complete all the levels.