Peer2Play WhitePaper
  • 📜Introduction
  • ⛔Problem Statement
  • đŸ› ī¸Solution
  • đŸŽ¯Mission and Vision
  • ⚡Key Features
    • Game Tokenization
    • Developer On-Boarding
    • Player-Driven Ecosystem
    • Transparent Revenue Sharing
    • On-chain Tournaments
    • Tokenized Economy
    • Cross-Chain Integration
    • Governance and Incentives
      • GameDAO
      • Incentives
    • Co-Ownership Model
      • Tokenized Games
      • Buybacks and Burns
  • 🤖AI Agents
  • Games
    • âœ‚ī¸Punk Paper(LIVE)
    • 🏏Decentralized Cricket League (DCL)(LIVE)
    • đŸ‹ī¸Chain Duel(Coming Soon)
    • đŸ•šī¸Upcoming Games
  • 🧩Use cases
  • đŸ’ĢGetting started
    • Game Developers
    • Influencers
    • Gamers
  • 👨‍đŸ’ģTechnical Architecture
    • MPC Wallet
    • Smart contract Architecture
      • Peer2PlayGenericStakingContract
        • Chess
        • Poker
        • Ludo
      • Peer2PlayGenericNonStakingContract
        • 1. Role-Playing Game (RPG)
        • 2. City-Building Game
        • 3. Farming Simulations
      • Tokenization & Revenue distribution
    • SDKs & APIs
  • 🔐Compliance & Security
  • ❓FAQ & Troubleshooting
  • 🤝Connect with Peer2Play
Powered by GitBook
On this page
  1. Technical Architecture
  2. Smart contract Architecture
  3. Peer2PlayGenericNonStakingContract

1. Role-Playing Game (RPG)

Ex: CryptoRPG Quest

Game Flow:

  1. Add the Game:

    • Admin calls addGame("CryptoRPG", gameOwner, "ipfsHash", 500) to register the game with a 5% fee.

    • ipnsHash: IPFS hash pointing to the game's metadata, including quest descriptions, rewards, and NPCs.

  2. Register Player:

    • Player calls registerOnGame(gameId) to join the game.

    • On-chain: Player address stored in the players array for the game.

  3. Token Deployment:

    • Game owner calls deployTokenContract(gameId, "ERC721", "QuestItems", "RPGI") to deploy a token contract for in-game items.

  4. Game Play:

    • Player completes a quest and earns an NFT item (e.g., "Sword of Valor").

    • On-chain: NFT is minted and transferred to the player.

    • IPFS: The token's metadata (name, description, image) is stored.

On-Chain Data:

  • Player addresses, token contracts, and NFTs. IPFS Data:

  • Quest details, item metadata, and game storyline.

PreviousPeer2PlayGenericNonStakingContractNext2. City-Building Game
👨‍đŸ’ģ