Get started with demo

About ShingGoong

ShingGoong is a simple demo game that works with TentuPlay service. If you are new to TentuPlay, it serves as a working example that allows you to have hands-on practice on TentuPlay features and to give you an aid for understanding how a game can be implemented and integrated with TentuPlay. Once you come to grasp the basic concepts and skills of TentuPlay by using the demo game, you will be able to apply them to any of your own games.

About this guide

Given that most of conceptual information and tutorials provided in the TentuPlay documentation are based on the demo game, you can find the explanations about ShingGoong demo either explicitly or implicitly throughout all the documentation besides this section. Thus, it would be helpful if you use this page as a summary or a guideline to navigate through other detailed information.


This section provides information about how the demo game interacts with the rest of TentuPlay components like the console and server. It also gives a high-level perspective to your work to let you get an overall sense of what needs to be done.

Simplified workflow


First, you need to download the TentuPlay SDK with Demo package and import it into your Unity project. After configuring TentuPlay settings in Unity editor or using a script, you need to collect player’s behavioral data by using pre-written TentuPlay methods and classes or adding the lines of code for each event in the demo game scripts as necessary. The next step is to ensure that you upload collected data to TentuPlay server correctly.


Now, it’s time to play the game. The methods are called when driven by the applicable events that involve a series of user activities such as login, starting stage, and consuming in-game currency. They gather and transfer the user action records to TentuPlay according to its pre-defined upload rule.


Uploaded data will be stored within TentuPlay database and processed by the data analysis engine by its own schedule. As a result, the content for the offers is generated and ready to be retrieved by the corresponding API calls. An offer in TentuPlay is a type of recommendation system to improve users' efficiency and experience in the game. What you need to do regarding offers are to define and configure in both Unity editor and Console what type of offer to send, what the offer messages should look like (that is, offer UI), when to send, and so on.

If an offer gets constructed and prepared using its template, message body, and message type, it appears on the game screen according to when the offer is made to show (For the demo game, it is when a game is over).

Get prepared for data collection and upload

Download SDK

ShingGoong game demo is available and included in the TentuPlay SDK.

The demo game requires 2019 LTS or later versions of Unity.

  1. Create a new account and a project in the Console.

  2. Download the SDK.

    To download the SDK that comes with ShingGoong demo, make sure that you download Unity SDK v2021.4 + Demo (.NET 4.x). If you are already familiar with the nuts and bolts of TentuPlay, you can go directly to the standalone SDK without the demo and start working on it.

Install SDK

The following steps are to be done within the Unity editor.

Set up for data collection and upload

This step is where code comes in for the first time but you don’t have to start from scratch to do the job. Some of common methods that you are required to add to core game logic are already written within the demo game source scripts with some informative comments. To identify the methods that fall into those of TentuPlay in the source code, refer to API Documentation. Simply put, there are three classes (that is, TPStashEvent, TPUploadData, TPPersonalizedOffer) available under two namespaces, and each class has several methods to perform data collection, data upload, or offer generation depending on the event.

For data collection and upload, only TPStashEvent and TPUploadData classes are involved. If you choose to use Auto Upload in TentuPlay Settings, only TPStashEvent and its methods are necessary because TPUploadData is used for manual upload only.

Here are some of APIs used in the demo game:

Class Method Description Tag Game Script



Collects user registration data

Data collection



Collects user’s app login data


Collects the character’s in-game currency acquisition data


Collects the character’s in-game currency spending data


Collects the character’s equipment acquisition data


Collects the event when the character either wears or takes off an equipment


Collects the event when the character either attaches or detaches the skill


Collects the character’s level up data



Collects the data of various stages where the character plays in the game



Collects the data of the skill that the character attaches for the stage


Collects the data of the equipment that the character brings to the stage



Uploads collected data manually

Data upload


For more information about data collection, see Collect Data. It demonstrates by example how to call two methods (Join(), LoginApp()) for gathering join and login event that usually occur before game starts. To check whether data is collected and uploaded correctly, see Debug SDK.

Aside from demo game, you may not be sure which method is appropriate to use depending on event types and game genres. Method recipes will help you in this case.

Get prepared for offers

There are two types of offers in TentuPlay — Personalized Offer and AI In-Game Shop Offer. To make a long story short, Personalized Offer is a manual offer that contains custom messages for target users, whereas AI In-Game Shop Offer is an automated offer that varies depending on players' behavioral patterns identified by AI.

In Unity editor

TPPersonalizedOffer is the common class used for both kinds of offers. It contains a few methods to retrieve or show offers such as ShowOfferById and ShowLatestOffer.

  1. Make sure that TPPersonalizedOfferController object has been added to demo game scene.

  2. Call either ShowOfferById or ShowLatestOffer by using TPPersonalizedOfferController game object parameters to show offers automatically.

In TentuPlay console

TentuPlay Console provides everything you need with regard to offers when using TentuPlay service. In other words, you can set what, when, how, and to whom you want to send and control the pre-configured user segments through the Console interface. It also allows you to preview and test offers before they actually reach players. Finally, you can check and evaluate how the offers given to players have been worked in related dashboards.

For more information, see Personalized offer and AI in-game shop.

Play ShingGoong

The preparation is done. Let’s play the game.

Start the game

  1. Open the Unity project where TentuPlay SDK is installed.

  2. Go to the Assets > ShingGoongDemo > Scenes folder.

  3. Double-click StartScene and click Play on the top of the screen.

    tutorial game rule 01
  4. Click START in the main screen to start the game.

    tutorial game rule 02
    ShingGoongDemo Opening Scene (StartScene)

    To close the game, press ESC and click the Door button in game.

How to play


Destroy all the robots (also known as monsters) in the stage using your bow and arrows.

  • For keymap reference, press ESC and click the Question button in game.

  • Purchase equipments available from the store that NPC runs as necessary and wear them in the shelter.

  • Collect dropped coins and retrieve the arrows for reuse, if any.


The game contains the following rules:

  • The player character has one live only.

  • If the character gets within the enemy’s line of sight, the stage will end.

  • If the character contacts the electric fences, the stage will end.

  • The numbers of arrows are limited. Arrows can be recollected after being shot.

  • Arrows cannot penetrate through walls or the ground and disappear if they touch one of the electric fences.

How methods work during play

This time, let’s look into what changes are made and what methods are called as you play the game.

Service flow until a user receives an offer
Step Description Method Scene Game Script


Run App and enter the main screen



Click START in the main screen and enter the shelter



Log in to the game

LoginApp(), Join(), (UploadData())



GetOfferAsync(), SelectOfferInfo()



Meet the NPC and buy a Bomb Bow in his store

UseCurrency(), GetEquipment()




Open the inventory and equip the Bomb Bow

EquipEquipment(), EquipSkill()




Enter the first stage to battle through the teleport

PlayStage(), PlayStageWithSkill(), PlayStageWithEquipment()




Destroy the robots and get the coins that they drop





Level up the character by gaining experience




The character has died and game is over




Clear the first stage by defeating all the monsters




Enter the boss stage through the teleport

PlayStage(), PlayStageWithSkill(), PlayStageWithEquipment()



If Auto Upload is selected in Unity Editor (TentuPlay > Edit Settings), you can view data in real time at Project Settings > SDK Status in the TentuPlay console.

The data collected during playing ShingGoongDemo is recorded as data of Player UUID: TentuPlayer.

3 edit
ShingGoongDemo data in real time