Game Sandbox Usage Guide
Welcome to use the Playol sandbox test! This is an online debugging environment. You don't need complex configuration. Just upload your game package, and you can complete all SDK functions' testing and debugging in an integrated interface, greatly improving development efficiency.
🎈1. Prerequisites
Before starting the sandbox test, please ensure that you have completed the following steps:
- Register an account
You must have a valid Playol developer account. - Integrated SDK
The latest version of the SDK has been integrated into your game project as per the Playol SDK User Guide. - Configure the test environment
In your code, the SDK has been set to the test mode.
🗂️2. Interface Navigation
After uploading the game, you will see the following interface:
Left sidebar - SDK Data Monitoring Panel
Real-time display of SDK call logs, success/failure status, returned data, etc. This is the core tool for you to troubleshoot issues.Middle area - Game preview window
The game you uploaded will run here, just like in a real device environment.Right sidebar - SDK Automatic Detection Panel
The platform will automatically scan the SDK modules that have been integrated in your game package and display their status (for example: ✅ The appKey has been initialized).
🥊3. Quick Start: Four Steps to the Test
Log in to the platform
- Log in to Playol Developer Platform.
- Find and click on "Sandbox Testing" in the left menu bar.
Upload the game package
- On the sandbox testing page, you will see a clearly defined drag-and-drop area.
- Simply drag your game installation package into this area, Or click this area to select from local files.
- Click "Submit" and the system will automatically start the upload and parsing process.
Note: This page will display the total number of files. Each file has its own upload status. For files that failed to upload, you can choose to upload them in batches or upload them individually.
Waiting for the environment to initialize
After the upload is completed, the system will automatically handle the following tasks for you:
- Create a temporary test game project in the background.
- Generate a dedicated sandbox testing environment configuration.
- Start a simulator container to run your game.
- Automatically detect the SDK modules you have integrated.
Start the interactive test
Once the environment is ready, the interface will be divided into three columns: left, middle and right. Now you can:
- Operate your game directly within the middle game window.
- Trigger the SDK functions (such as login, reporting achievements, etc.).
- Observe the corresponding SDK call logs and data in real time on the left sidebar.
- On the right sidebar, confirm whether all the SDK modules have been correctly identified.
🧩4. Core Function Module Test Description
👤 User module testing
Test content
- Verify whether the SDK can correctly inject user information, whether it can successfully retrieve the latest data, and whether it can monitor user change events.
Operation Procedure
- After the game is loaded, enter
console.log(window.playolSDK.user.userInfo)in the browser console to check if the SDK data monitoring panel on the left side prints out the correct user information object (including userId, userName, avatar, sex, userType). - In your game, call
await window.playolSDK.user.getUserInfo(), then observe the asynchronous request log in the left sidebar to confirm that the returned data is consistent with the cacheduserInfo.
🎮 Game module testing
Test content
- Verify the reporting of game behavior events (loading, running, status), as well as the synchronization functions of achievements, leaderboards, and asset data.
Operation Procedure
- Resource loading: When the game starts loading, call
window.playolSDK.game.loadingStart(), and when the loading is complete, callloadingStop(). Observe in the left sidebar if there are corresponding reporting records. - Game status: When entering the main game scene, call
playStart(), and when pausing, callplayStop(). Confirm the status report success in the left column. - Achievement System: When a certain achievement condition is met (such as completing a level), call
window.playolSDK.game.syncAchievement('ACHIEVEMENT_KEY', 1). Check the reported data on the left sidebar to ensure its correctness. - Ranking List: When the score changes or the level ends, call
window.playolSDK.game.syncRankData(1000). On the left sidebar, confirm that the score value has been successfully reported. - Asset Synchronization: When the player receives a reward or uses an item, call
window.playolSDK.game.syncAssets('gold', 500). Check in the left column whether the reported asset key name and value are correct.
📊 Data module testing
Test content
- Verify the settings, acquisition, deletion and cloud synchronization functions of the user's game data (such as save files and configurations).
Operation Procedure
- Data Settings (Set): After operating in the game (such as changing settings or entering a new level), call
window.playolSDK.data.set(...)`。 Check in the left column to see if there are any successful operation logs set up. - Obtain the specified data (Get): Call
const data = await window.playolSDK.data.get('currentLevel'). Check in the left sidebar whether an acquisition request has been initiated and whether the previously set value has been successfully returned. - Get All Data(GetAll): Call
await window.playolSDK.data.getAll(). Check in the left sidebar to see if a complete object containing all the set key-value pairs has been returned. - Data deletion (Del): Call
window.playolSDK.data.del('musicOn'). Then, callget('musicOn')again. Confirm on the left sidebar that the key-value pair has been successfully deleted (it will return null or undefined). - Cleaning test: After the test is completed, the
clear()method can be called to clear the test data, preparing a clean environment for the next test.
📺 Advertising module test
Test content
- Verify the triggering, callback and ad-blocking detection functions of incentive video ads and ordinary interstitial ads.
Operation Procedure
Incentive advertising test
- In the game, click the button that triggers the incentive advertisement (such as "Watch the ad to get gold coins"), and call
window.playolSDK.ad.openRewardAd({...} ). - In the left column, observe the advertisement process log: the function beforeAd is called -> watch the test advertisement -> based on the viewing result, trigger the adViewed (complete viewing) or adDismissed (skip) callback -> eventually, the afterAd callback will definitely be triggered.
- The key point is to carefully check the
res.statusandres.msgreturned by theafterAdcallback, and distribute rewards in your game based on the status (with 1 indicating success).
Insert advertisement test
- At the natural interruption points of the game (such as at the end of a level or during a pause), call
window.playolSDK.ad.openNormalAd({...} ). - Observe the beforeAd and afterAd callback logs in the left column to confirm that the advertisement display process has been completed.
Ad Block Detection
- Call
const isBlocked = await window.playolSDK.ad.hasAdblock(). - View the returned test results in the left column and test the prompt logic for intercepting users in your game.
🤝 Invitation module test
Test content
- Verify the functions of creating, sharing and reading the invitation parameters through the invitation link.
Operation Procedure
Create an invitation link
- In the game, call
const link = await window.playolSDK.invite.createInviteLink({ roomId: 'testRoom123', source: 'test' }). - Observe the generated invitation short link log in the left column and check if it has returned successfully. You can copy this link and open it in the browser for the next test.
Use the built-in invitation UI
- Call the
showInviteButtonmethod to test whether the built-in sharing pop-up UI in the platform can be properly invoked and displayed.
Read the invitation parameters (for the invited party)
- Open a new browser tab, paste the invitation link generated in the previous step and visit it.
- After the game is loaded, read
window.playolSDK.invite.inviteParamsin the browser console or in your game code. - In the data monitoring panel on the left sidebar, verify whether the invitation parameters (such as roomId: 'testRoom123') have been successfully injected. Your game logic should be able to correctly read these parameters and perform the corresponding operations (such as automatically joining the room).
🌐 Multilingual configuration test
Test content
- Verify whether the game can correctly obtain and apply the language environment configuration injected by the platform.
Operation Procedure
Get the current language
- After the game is initialized, the line
const lang = window.playolSDK.i18n.languageis immediately executed. - Check in the left column whether the obtained language identifier (such as 'en', 'th', 'zh') is correct.
Application language configuration
- Check whether the game interface (UI text, menus, etc.) has switched to the corresponding language package based on the obtained
langvalue.
Language Switching Test (Simulation)
- You can simulate the access of users in different languages by directly modifying the URL in the browser address bar or by using the language switch dropdown menu.
- After refreshing the page, check if the game language has been switched to the target language (such as Thai, Vietnamese).
📢5. How to view test results and troubleshoot issues
Real-time logs (left sidebar)
This is your most important debugging tool. All interactions between the SDK and the platform will be printed out in real time here, including:
- API request
Which interface was called and what parameters were sent? - API response
What data (successful or failed) did the platform return? - Callback notification
The callback provided by the SDK to the game (such as the distribution of advertising rewards).
When the function fails, first check if there are any error codes and error messages here.
Automatic Detection Report (on the right sidebar)
This panel clearly shows which SDK modules are integrated into your game package. If a module that you think has been integrated is shown as "Not Detected", please check:
- Is the SDK initialization code correct?
- Is the game package the latest integrated version?
📦6. Frequently Asked Questions Answered(FAQ)
Q: What should I do if the game package is uploaded but it fails to start or shows a blank screen?
A: Please check if your game package is complete and confirm that it can run properly on a standard Android emulator. A blank screen is usually a compatibility issue with the game itself.
Q: Why can't I see any SDK logs in the left column?
A: This usually indicates that the SDK failed to initialize successfully or that your game did not properly call the SDK methods. Please check:
- Has your code already invoked the
window.playolSDK.initSDKParam(...)method? - Is the uploaded package an integrated version of the SDK test?
Q: Will the test data be retained?
A: No. Every time the test page is closed, all temporary data will be cleared. Each re-upload creates a completely new, clean environment.
Q: Can I test multiple games simultaneously?
A: Currently, the platform only supports running one game instance at a time. When testing a new game, it is necessary to re-upload it.
🔗 Related Docs
👉 User Module | Game Module | Payment Module | Invite Module