Integrating of subject matter onto serious games is an important problem that has been shown to impact the learning potential of serious games. A novel approach, inspired by peer-to-peer (P2P) networks, towards designing and deploying a series of problems in game scenarios is described. Given a set of problems involving a set of concepts the proposed approach automatically generates a problem network graph akin to P2P network that can then traversed by a player to collect all the concepts that are necessary to learn a topic of interest. A network traversal algorithm is described, which identifies the relevant problems and produces an efficient route through the network for learning the topic. We also describe an algorithm for mapping the problem network graph onto a game scenario by identifying groups of problems that can be placed in a single location of the game like the level of a building, arcade, or a room, physical barriers that separate, and the conditions for passing through these barriers. The proposed approach has been validated through a quantum cryptography game QuaSim and has been played by over 100 students to learn quantum cryptography basics and cryptography protocols.