Ludo
  • 👋Welcome to Ludo
  • Overview
    • 💡What We Do
  • Gaming: Getting Started
    • 🎮Ludo Onboarding Guide
      • 1. Creating Your Account
      • 2. Setting Up Integrations
      • 3. Configuring Points
      • 4. Creating a Mini-Game
      • 5. Setting Up Campaigns
    • ⚙️Getting Set Up With Custom Integration
      • ⚒️Game Integration Setup Guide
      • Uploading Game Assets with JSON Files
      • 🪅Webhook Integration and Data Handling
  • Product Guides
    • 🎮Daily Games
    • 🏸Quests & Missions
  • Engaging Your Community
    • 💎Building a Loyal Community
    • 🎲Gamification and Reward Strategies
  • Blockchain Rewards
    • 🎯Why Blockchain for Loyalty Programs
  • USE CASES
    • 🛍️For Consumer Brands
    • 🇸🇴For Web2
    • ⛓️For Web3
    • 🎮For Gaming
    • Page
    • 🎥Case Studies
  • Learn more
    • 📜Whitepaper
    • 🔐Security Information
    • 🛠️Subprocessors
Powered by GitBook
On this page
  1. Gaming: Getting Started
  2. Getting Set Up With Custom Integration

Uploading Game Assets with JSON Files

To allow your customers to redeem in-game assets via the whitelabel marketplace and synchronize them directly with the in-game environment, you'll need to upload two key files to the Ludo system via the Integrations > Game Sync button: items.json and products.json. Once these files are uploaded, you’ll map each JSON header to the corresponding columns in the system.

The system requires certain fields to ensure proper matching, and one of the critical aspects is to ensure that the item or product ID in the JSON matches the ID used within the game. This will enable your users to redeem and display items in-game effectively.

Steps for Uploading and Mapping JSON Files:

  1. Navigate to the Game Sync Section:

    • Go to Integrations > Game Sync in the Ludo system.

  2. Upload items.json and products.json:

    • Upload your JSON files containing the relevant data for in-game assets and products.

  3. Map JSON Headers to Columns:

    • After uploading, map each JSON header to the corresponding system column in Ludo.

    • Certain fields like itemId, rewardType, and rewardId are required for proper functionality. Ensure the IDs match the ones used in your game environment.

  4. Complete the Integration:

    • Once the mapping is complete, click Save to finalize the setup. Your in-game assets will now be synchronized with the whitelabel marketplace and reflected directly in the game.


Example JSON Files:

items.json:

[
  {
    "rewardType": 1,
    "rewardId": "test-item-1",
    "nameEn": "Test Item 1",
    "descriptionEn": "This is a test item for the Marketplace.",
    "imageURL": "https://example.com/images/test-item-1.png"
  },
  {
    "rewardType": 1,
    "rewardId": "test-item-2",
    "nameEn": "Test Item 2",
    "descriptionEn": "This is another test item for the Marketplace.",
    "imageURL": "https://example.com/images/test-item-2.png"
  }
]

products.json:

[
  {
    "id": 1,
    "nameEn": "Starter Pack",
    "descriptionEn": "A special pack for beginners.",
    "rewards": [
      { "rewardType": 10, "rewardId": 0, "rewardNum": 300 },
      { "rewardType": 3, "rewardId": 4010101, "rewardNum": 3 }
    ],
    "price": 0,
    "startsAt": 1640962800,
    "endsAt": 1640962800
  },
  {
    "id": 2,
    "nameEn": "Premium Pack",
    "descriptionEn": "A premium package with additional rewards.",
    "rewards": [
      { "rewardType": 3, "rewardId": 4130101, "rewardNum": 5 },
      { "rewardType": 3, "rewardId": 4130102, "rewardNum": 1 }
    ],
    "price": 100,
    "startsAt": 1640962800,
    "endsAt": 1640962800
  }
]

Displaying In-Game Items for Users

After syncing the game data, the system provides a webhook for updating in-game assets for individual players. The webhook sends data to your system with the relevant player ID and associated items, allowing you to show the items in-game in real-time.

Webhook Process:

  1. Webhook Trigger:

    • The Ludo system sends a webhook containing the playerId, itemId, and other necessary data when an item is claimed or modified.

  2. Update Player Data:

    • Upon receiving the webhook, update the player's in-game data by associating the received items with the corresponding playerId.

  3. Show Items in Game:

    • Ensure your game backend processes the data and displays the items to the player within the game interface.


Sample Webhook Data:

{
  "playerId": "123456",
  "items": [
    {
      "itemId": "ludo-test",
      "rewardType": 1,
      "rewardNum": 1
    },
    {
      "itemId": "ludo-dealer",
      "rewardType": 1,
      "rewardNum": 1
    }
  ]
}

For further details, refer to the Webhook Documentation for integrating this system into your game's architecture.

PreviousGame Integration Setup GuideNextWebhook Integration and Data Handling

Last updated 9 months ago

⚙️