SAN FRANCISCO — Pokémon is about to leave the realm of pure fantasy and jump into the real world.

Niantic — the maker of the smartphone game Ingress, which combines onscreen actions with physical locations that players must visit — is using similar concepts to build Pokémon Go, the latest installment in the best-selling Pokémon video game series.

Like earlier Pokémon games, players will throw virtual balls to capture “pocket monsters,” or Pokémon. They can be used to defend gyms, where the creatures train to become stronger. Rivals can try to take over the gym by using their own monsters to attack the gym’s protectors.

But the new game will also force players to look beyond their screens and visit places in the real world. As in Ingress, places like parks, historical markers, libraries, churches and commuter stations will hold valuable items in the game, retrievable only when physically close to the locations. To hatch a new Pokémon from an egg, players will have to walk one kilometer, as measured by the smartphone’s sensors. The game will use the phone’s camera to show virtual Pokémon dancing near a park bench or hiding in a bush, trying to evade capture.