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:
Navigate to the Game Sync Section:
Go to Integrations > Game Sync in the Ludo system.
Upload
items.json
andproducts.json
:Upload your JSON files containing the relevant data for in-game assets and products.
Map JSON Headers to Columns:
After uploading, map each JSON header to the corresponding system column in Ludo.
Certain fields like
itemId
,rewardType
, andrewardId
are required for proper functionality. Ensure the IDs match the ones used in your game environment.
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
:
products.json
:
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:
Webhook Trigger:
The Ludo system sends a webhook containing the
playerId
,itemId
, and other necessary data when an item is claimed or modified.
Update Player Data:
Upon receiving the webhook, update the player's in-game data by associating the received items with the corresponding
playerId
.
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:
For further details, refer to the Webhook Documentation for integrating this system into your game's architecture.
Last updated