Skip to main content

Cloud Code

Cloud Code is a feature that allows you to write and execute server-side scripts. You can create cloud code tables, write scripts in the code editor, and then test and deploy them.

Use Cases

  • Daily Login Rewards - Check the player's attendance count and automatically grant game currency or items based on conditions
  • Random Reward Draws (Gacha) - Determine random items based on probability tables and grant the results to players
  • Level-Up Rewards - Verify reward conditions on the server when a player reaches a level and grant rewards
  • Friend Gift Sending - Process business logic on the server such as daily gift limit validation
  • Guild Level Calculation - Calculate and update guild levels by aggregating member activity
  • PvP Match Result Verification - Verify battle results received from the client on the server to prevent cheating
info

By using Cloud Code, the core game logic is processed on the server, providing stronger security against data tampering and hacking compared to client-side processing.

Activate Service

To use the Cloud Code feature, you must first activate the service. Click the activation button to start the service.

Cloud Code Table Management

Table List

FieldDescription
CodeUnique code of the cloud code table
NameCloud code table name
Modified DateLast modified date
Created DateTable creation date
ActionsEdit, Delete buttons

Register Table

To register a new cloud code table, click the Add button at the bottom of the list.

FieldDescription
Name *Enter the name of the cloud code table

Edit Table

Click the edit button in the list to modify the cloud code table's name.

Code Editor

Click the code in the table list to navigate to the code editor page. The editor page consists of the Editor tab and the Test tab.

Editor

In the editor tab, you can write and manage cloud code scripts.

FieldDescription
Version SelectionSelect the version of the written script. The currently deployed version is indicated
Save as New VersionSave the current code as a new version
DeployDeploy the selected version
DeleteDelete the selected version
info

The currently deployed version cannot be deployed or deleted. You must deploy a different version first before managing the previous version.

Test

In the test tab, you can execute and test the written cloud code scripts.

FieldDescription
Version *Select the script version to test
Function *Select the function to execute
Parameters *Enter test parameters in JSON format

The test results are displayed at the bottom after execution.