NAV
Unity iOS Android Cocos2D-X

Introduction

On the high growth mobile games market, player retention is key to monetization (CPI < LTV), and player retention depends heavily on difficulty tuning. But difficulty tuning is complicated and tedious, analytics tools are complex to setup and they let you tune blindfolded. Plus player retention hits a ceiling: mobile players are very diverse, one size does not fit all!

askblu.ai is a ML-SaaS Real-Time Player Personalization Platform for mobile games.
It simplifies and optimizes your difficulty balancing, increases your player retention and Revenue.

askblu.ai offers 2 main features:

In the askblu.ai web portal, you get all the metrics and funnels you need, you can also compare the results with and without askblu.ai (click here for more information)

Check our GET STARTED web page to start putting Machine Learning at work on your games!

How askblu.ai works

1 - Game flow, frustration and boredom

Players will stay in your game as long as they stay in their “flow” comfort zone, meaning in a well-being status, enjoying the gameplay, having fun.

There are 2 main reasons for a player to stop playing after a certain time (churn):

askblu.ai is doing churn prediction in real-time, telling your game wether the current player is feeling frustrated of bored, or seems to be ok.

2 - Collecting events

askblu.ai is a “plug&play” solution for game and level designers, developers and producers, no need for Data Engineers and Data Scientists.

You do not need to think about which data you have to send to the platform, we have a precise list of events, as simple as possible.

All data is completely anomynous (no IDFA or any other external player ID used), and never shared between games.

3 - Churn prediction

Before a player starts a stage, you send the askbluDiff() request, and the platform will answer in real time, doing churn prediction:

Tell us which game you want to power with askblu.ai, we will play it, and help you find the best way to increase/decrease the difficulty based on askblu.ai prediction.

Downloads

The askblu.ai SDK is available for Unity (C#), XCode (ObjectiveC and C++) and Android Studio (Java).

Unity (C#)

The askblu.ai SDK supports versions of the Unity Editor 2018.2 or higher.

Download the askblu.ai Unity SDK, then select your programming language at the top right of the window and check how to start the askblu.ai SDK integration.

XCode (objC, C++)

XCode version must be 7.2 or higher
Apps must be compiled with iOS base SDK v9.2 or higher.
The askbluai SDK will work on devices with iOS 8.0 or higher.
NOTE: the SDK does NOT use the Apple IDFA.

Download the askblu.ai objC SDK
or
Download the askblu.ai C++ SDK,
then select your programming language at the top right of the window and check how to start the askblu.ai SDK integration.

Android Studio (Java)

The android platform version should be at least 19

Download the askblu.ai Java SDK, then select your programming language at the top right of the window and check how to start the askblu.ai SDK integration.

Integration

Step 1. Extract files from the SDK archive and import the askblu.ai SDK

Simply drag & drop the unity package in your Unity project and select "Import" to copy the package content to your Unity project.



A new entry "askblu.ai" will appear in the Window option of the Unity menu.



Step 2. Create the askblu.ai Configuration Script.

In the askblu.ai menu, select "Create askblu.ai Config Script". It will create an askblu.ai configuration script in the Resources folder. The script will be used by the SDK to retrieve required information, we will show you how to edit that in the following steps.

Step 3. Get your application API key.

Go to your dashboard on the "askblu.ai portal".
Select your application and go to the "Setup" tab. In the SDK Data section, click on the button "COPY TO CLIPBOARD".



Step 4. Add your game key.

Open the askblu.ai Configuration Script created in the Step 2 and paste your game key in the apiKey field.

Step 5. Edit the isNewPlayer() method.

public static bool isNewPlayer()
{
    if (PlayerPrefs.GetInt(askbluai_Config.newInstallKey) == 0)
    {
        PlayerPrefs.SetInt(askbluai_Config.newInstallKey, 1);

        PlayerPrefs.Save();

        return true;
    }

    return false;
}

The "isNewPlayer()" method is an important method that must be edited correctly to differentiate new players and existing players.
Existing players are players that have already played the game before the askblu.ai integration.

It must return "true" only if a player starts the game for the first time.
It must return "false" for the subsequent sessions or if the player is an existing player.

By default, the player will be considered new the first time the askblu.ai SDK is initialized.

Open the askblu.ai Configuration Script and edit the isNewPlayer() method to add your own new player detection.



Step 6. Edit the getSdkMode() method.

public static askbluai_Mode getSDKMode()
{
    return askbluai_Mode.RELEASE;
}

The "getSDKMode()" method enables to choose an operating mode for the SDK (askbluai_Mode_RELEASE, askbluai_Mode_DEBUG, askbluai_Mode_OFF).
askbluai_Mode_RELEASE: askblu.ai will only work if the value is set to askbluai_Mode_RELEASE.
askbluai_Mode_DEBUG: this mode enables to check if the askblu.ai SDK integration has been done correctly. You will be able to see on the dashboard if the events are sent. To know more about the Debug mode, check the detailed article..
askbluai_Mode_OFF: you can set the value to askbluai_Mode_OFF if you want to disable the SDK for some players. The SDK will not send events and the getBLUDiff() method will always return REF.

Step 7. Add the askblu.ai prefab.

askblu.ai needs to be initialized at the start of your game, to do so the askblu.ai prefab needs to be added in the first scene of your game.
Open your first scene then select in the askblu.ai menu "Create askblu.ai prefab".
It will create an askbluai prefab in your current scene, it will initialize the SDK when you scene will run.

Step 1. Extract files from the SDK archive.

You will get a folder which contains three files :
- libaskbluai.a: the askblu.ai library
- askbluai.h: the askblu.ai API
- askbluai_Settings.h: structures that help to set methods parameters

Step 2. Add the askblu.ai folder to your XCode project.

Simply drag & drop the folder in your XCode project and select "Copy items if needed" to create a local copy of the files.

Step 3. Edit the target Build Settings.

Add the path to the askblu.ai library to the "Library Search Paths" setting



Add "-ObjC" to the "Other Linker Flags" setting



Step 4. Edit the target Build Phases.

Open the "Link Binary With Libraries" setting and check if the libaskbluai.a library appears in the list. If not, please add it.





Step 5. Get your application API key.

Go to your dashboard on the "askblu.ai portal".
Select your application and go to the "Setup" tab. Go to the SDK Data section and click on the button "COPY TO CLIPBOARD".



Step 6. Connect askblu.ai and the AppDelegate file.

#import "askbluaiCppIos.h"

1. Import the askblu.ai API header


2. Initialize the askblu.ai SDK in the applicationDidFinishLaunching method

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

   //Check if the player is a new player
   bool playerStatus = [self isNewPlayer];
   askbluai_Mode sdkMode = [self getSDKMode];
   NSString* apiKey = @"PASTE_YOUR_ASKBLUAI_API_KEY_HERE";

   //Initialize the AskBLU library
   [libaskbluai initWithKey:apiKey withNewPlayer:isNewPLayer andSDKMode:mode];

    return true;
}


askblu.ai needs to be initialized at the start of your game, to do so you must call the "initWithKey(String apiKey, bool playserStatus, askbluai_Mode sdkMode)" method as soon as your application starts.
Paste your API key in the designated field.

The boolean "playerStatus" is an important parameter that must be provided correctly to differentiate new players and existing players. Existing players are players that have already played the game before the askblu.ai integration.
It must return "true" only if a player starts the game for the first time.
It must return "false" for the subsequent sessions or if the player is an existing player.
Create your own "isNewPlayer" function to add your own new player detection.

The parameter sdkMode enables to choose an operating mode for the SDK (askbluai_Mode_RELEASE, askbluai_Mode_DEBUG, askbluai_Mode_OFF).
askbluai_Mode_RELEASE: askblu.ai will only work if the value is set to askbluai_Mode_RELEASE.
askbluai_Mode_DEBUG: this mode enables to check if the askblu.ai SDK integration has been done correctly. You will be able to see on the dashboard if the events are sent. To know more about the Debug mode, check the detailed article..
askbluai_Mode_OFF: you can set the value to askbluai_Mode_OFF if you want to disable the SDK for some players. The SDK will not send events and the getBLUDiff() method will always return REF.



3. Add the "suspend" event in the applicationDidEnterBackground method

- (void)applicationDidEnterBackground:(UIApplication *)application {

    [libaskbluai suspend];
}







4. Add the "resume" event in the applicationWillEnterForeground method

- (void)applicationWillEnterForeground:(UIApplication *)application {

    [libaskbluai resume];
}







Step 7. You are now ready to add requests and events.

You should now be able to build and run your project with askblu.ai working.

If there are compilation errors, please check that :
the "Base SDK" setting is iOS 9.2 or higher
the "iOS Deployment Target" is iOS 8.0 or higher

If you successfully started your app, you will see the message "askblu.ai initialization succeeded" in your console logs.
Otherwise you'll see "askblu.ai initialization failed, please, check your API key."

Step 1. In the app folder of your android project, create a folder named "libs" and copy the askbluai android archive inside.

Step 2. Edit the build.gradle file of your app folder.

In the dependencies section, add the askbluai library.

dependencies {
    ...
    implementation (name: 'askbluai_and_java_lib', ext:'aar')
}







In the repositories section, add the path to your libs directory.

repositories {
    flatDir {
        dirs 'libs'
    }
}









Step 3. Check that the minSdkVersion parameter is 19 or higher..

Step 4. Get your application API key.

Go to your dashboard on the "askblu.ai portal".
Select your application and go to the "Setup" tab. Go to the SDK Data section and click on the button "COPY TO CLIPBOARD".



Step 5. Setup askblu.ai in your java activity file.

import fr.happybluefish.askbluaisdk.libaskbluai;
import fr.happybluefish.askbluaisdk.askbluai_PublicSettings;

1. Import the askblu.ai API header



2. Initialize the askblu.ai SDK in the "onCreate" method of your activity class

You must call the "initWithKey(String apiKey, bool playserStatus, askbluai_Mode sdkMode)" method as soon as your application starts.

protected void onCreate(Bundle savedInstanceState) {

  super.onCreate(savedInstanceState);

  boolean playerStatus = this.isNewPlayer();
  askbluai_PublicSettings.askbluai_Mode sdkMode = askbluai_PublicSettings.askbluai_Mode.RELEASE;  

  libaskbluai.initWithKey(this, "PASTE_YOUR_ASKBLUAI_API_KEY_HERE",  playerStatus, sdkMode);
}

Paste your API key in the designated field.

The boolean "playerStatus" is an important parameter that must be provided correctly to differentiate new players and existing players. Existing players are players that have already played the game before the askblu.ai integration.
It must return "true" only if a player starts the game for the first time.
It must return "false" for the subsequent sessions or if the player is an existing player.
Create your own "isNewPlayer" function to add your own new player detection.

The parameter sdkMode enables to choose an operating mode for the SDK (askbluai_Mode_RELEASE, askbluai_Mode_DEBUG, askbluai_Mode_OFF).
askbluai_Mode_RELEASE: askblu.ai will only work if the value is set to askbluai_Mode_RELEASE.
askbluai_Mode_DEBUG: this mode enables to check if the askblu.ai SDK integration has been done correctly. You will be able to see on the dashboard if the events are sent. To know more about the Debug mode, check the detailed article..
askbluai_Mode_OFF: you can set the value to askbluai_Mode_OFF if you want to disable the SDK for some players. The SDK will not send events and the getBLUDiff() method will always return REF.

3. Add the "resume" event in the "onResume" method of your activity class

protected void onResume() {

  super.onResume();

  libaskbluai.resume(this);
}









4. Add the "suspend" event in the "onPause" method of your activity class

protected void onPause() {

  super.onPause();

  libaskbluai.suspend(this);
}









Step 6. You are now ready to add requests and events.

If you successfully started your app, you will see the message "askblu.ai initialization succeeded" in your console logs.
Otherwise you'll see "askblu.ai initialization failed, please, check your API key."

If your main code is written in C++, you may use a Java Native Interface (JNI) to call the askblu.ai Java SDK code.

Step 1. Extract files from the SDK archive.

You will get a folder which contains three files :
- libaskbluai.a: the askblu.ai library - askbluai.h: the askblu.ai API - askbluai_Settings.h: structures that help to set methods parameters

Step 2. Add the askblu.ai folder to your XCode project.

Simply drag & drop the folder in your XCode project and select "Copy items if needed" to create a local copy of the files.

Step 3. Edit the target Build Settings.

Add the path to the askblu.ai library to the "Library Search Paths" setting



Add "-ObjC" to the "Other Linker Flags" setting



Step 4. Edit the target Build Phases.

Open the "Link Binary With Libraries" setting and check if the libaskbluai.a library appears in the list. If not, please add it.





Step 5. Get your application API key.

Go to your dashboard on the "askblu.ai portal".
Select your application and go to the "Setup" tab. Go to the SDK Data section and click on the button "COPY TO CLIPBOARD".



Step 6. Connect askblu.ai and the AppDelegate file.

#import "askbluaiCppIos.h"

1. Import the askblu.ai API header



2. Initialize the askblu.ai SDK in the applicationDidFinishLaunching method

You must call the "initWithKey(:String apiKey, bool playserStatus, askbluai_Mode sdkMode)" method as soon as your application starts.

bool AppDelegate::applicationDidFinishLaunching() {

   //Check if the player is a new player
   bool playerStatus = this->isNewPlayer();

   askbluai_Mode sdkMode = askbluai_Mode_RELEASE;


   //Initialize the AskBLU library
   askbluaiCppIos::initWithKey("PASTE_YOUR_ASKBLUAI_API_KEY_HERE", playerStatus, sdkMode);

    return true;
}

Paste your API key in the designated field.

The boolean "playerStatus" is an important parameter that must be provided correctly to differentiate new players and existing players. Existing players are players that have already played the game before the askblu.ai integration.
It must return "true" only if a player starts the game for the first time.
It must return "false" for the subsequent sessions or if the player is an existing player.
Create your own "isNewPlayer" function to add your own new player detection.

The parameter sdkMode enables to choose an operating mode for the SDK (askbluai_Mode_RELEASE, askbluai_Mode_DEBUG, askbluai_Mode_OFF).
askbluai_Mode_RELEASE: askblu.ai will only work if the value is set to askbluai_Mode_RELEASE.
askbluai_Mode_DEBUG: this mode enables to check if the askblu.ai SDK integration has been done correctly. You will be able to see on the dashboard if the events are sent. To know more about the Debug mode, check the detailed article..
askbluai_Mode_OFF: you can set the value to askbluai_Mode_OFF if you want to disable the SDK for some players. The SDK will not send events and the getBLUDiff() method will always return REF.


3. Add the "suspend" event in the applicationDidEnterBackground method

void AppDelegate::applicationDidEnterBackground() {

   askbluaiCppIos::suspend();
}







4. Add the "resume" event in the applicationWillEnterForeground method

void AppDelegate::applicationWillEnterForeground() {

   askbluaiCppIos::resume();
}







Step 7. You are now ready to add requests and events.

You should now be able to build and run your project with askblu.ai working.

If there are compilation errors, please check that :
the "Base SDK" setting is iOS 9.2 or higher
the "iOS Deployment Target" is iOS 8.0 or higher

If you successfully started your app, you will see the message "askblu.ai initialization succeeded" in your console logs.
Otherwise you'll see "askblu.ai initialization failed, please, check your API key."

Difficulty Request

In your game, the player will advance from stage to stage and can win, fail or quit each stage. askblu.ai will enable you to adapt the difficulty of each stage before the player starts playing.
Here is a summary of the SDK requests and events integration.

1. askBLUDiff(stageTag)

Call the “askBLUDiff(string stageTag)" request before the player starts a new stage

askbluai.:askBLUDiff(stageTag);
[libaskbluai askBLUDiff:@"stageTag"];
libaskbluai.askBLUDiff(myActivity, stageTag);
askbluaiCppIos::askBLUDiff(stageTag);

“askBLUDiff” is a request used to personalize each player experience. You can use it to know if the next stage should be easier, harder or be your defaut difficulty.

It has one parameter, “stageTag” which is the string identifier of the stage that is going to be played.

The askblu.ai library is non blocking, so the request system is separated in two steps: send the request first with “askBLUDiff”, then you can get the returned answer with “getBLUDiff”.

2. getBLUDiff()

Get the askblu.ai answer to set the difficulty with “getBLUDiff”

askbluai_Diff answer = askbluai.getBLUDiff();
kaskbluai_Diff answer = [libaskbluai getBLUDiff];
libaskbluai.getBLUDiff(myActivity);
askbluai_Diff answer = askbluaiCppIos::getBLUDiff();

The “getBLUDiff()" method will retrieve the result of the “askBLUDiff()" method so that you can adjust the difficulty of your next stage. You have to let a delay between the two calls so that the server has enough time to give the best response. We advise to call “askBLUDiff()" as soon as possible and “getBLUDiff()" as late as possible.

If the player is a BLU_Player (askblu.ai active for this player) the answer, whose type is askbluai_Diff, may have three different values:

If the player is a REF_Player (askblu.ai not active for this player), the answer is always askbluai_Diff_REF.

The developer may use this if they want to have their custom settings for a stage difficulty, or put the default difficulty setting.

==» All metrics and funnels in the web portal will display data for BLU_Players and REF_Players.

3. Adapt your difficulty

Based on the askbluai.ai answer, select the difficulty level for the player.

The “getBLUDiff()" method can only be called once for an “askBLUDiff()" request. If you need to use the answer multiple times, you must save it in a variable, the answer will be deleted after the result is returned.

Only the answer of the last request is saved. There can only be one answer at the same time. If you start a second request without retrieving the first answer, the first answer will be lost.

Events

4. stageStarted(stageTag)

askbluai.stageStarted(stageTag);
[libaskbluai stageStarted:@"stageTag"];
libaskbluai.stageStarted(myActivity, stageTag);
askbluaiCppIos::stageStarted(stageTag);

Send a stageStarted event when the player really starts playing the stage.
To do this, call the “stageStarted(string stageTag)" method.
The “stageStarted() method must be called when a player starts a stage, it must be associated with a “stageEnded()" event.
The value of the parameter “stageTag” must be the same as the one used in the “askBLUDiff()" request.

5. stageEnded(result, how, helped)

float helpedVal = 0.2f;
...
if (stageEnded) {

   askbluai.stageEnded(askbluai_Result.SUCCEED, askbluai_How.NORMAL, helpedVal);
}
else {

   if (large) {

      askbluai.stageEnded(askbluai_Result.FAIL, askbluai_How.LARGE, helpedVal);
   }
   else if (close) {

      askbluai.stageEnded(askbluai_Result.FAIL, askbluai_How.CLOSE, helpedVal);
   }
   else {

      askbluai.stageEnded(askbluai_Result.FAIL, askbluai_How.NORMAL, helpedVal);
   }
}
float helpedVal = 0.2f;
...
if (playerWins) {

  [libaskbluai stageEndedWithResult:kaskbluai_Result_SUCCEED withHow:askbluai_How_NORMAL andHelped:helpedVal];
}
else {

   if (large) {

      [libaskbluai stageEndedWithResult:kaskbluai_Result_FAIL withHow:kaskbluai_How_LARGE andHelped:helpedVal];
   }
   else if (close) {

      [libaskbluai stageEndedWithResult:kaskbluai_Result_FAIL withHow:kaskbluai_How_CLOSE andHelped:helpedVal];
   }
   else {

      [libaskbluai stageEndedWithResult:kaskbluai_Result_FAIL withHow:kaskbluai_How_NORMAL andHelped:helpedVal];
   }
}

float helpedVal = 0.2f;
...

if (playerWins) {

   askbluai_PublicSettings.askbluai_Result result = askbluai_PublicSettings.askbluai_Result.SUCCEED;
   askbluaiCppIos::stageEnded(askbluai_Result_SUCCEED, askbluai_How_NORMAL, helpedVal);
   libaskbluai.stageEnded(myActivity, result, how, helpedVal);
}
else {

   askbluai_PublicSettings.askbluai_Result result = askbluai_PublicSettings.askbluai_Result.FAIL;
   if (large) {

      askbluai_PublicSettings.askbluai_How how = askbluai_PublicSettings.askbluai_How.LARGE;    libaskbluai.stageEnded(myActivity, result, how, helpedVal);
   }
   else if (close) {

      askbluai_PublicSettings.askbluai_How how = askbluai_PublicSettings.askbluai_How.CLOSE;    libaskbluai.stageEnded(myActivity, result, how, helpedVal);
   }
   else {

      askbluai_PublicSettings.askbluai_How how = askbluai_PublicSettings.askbluai_How.NORMAL;    libaskbluai.stageEnded(myActivity, result, how, helpedVal);
   }
}
float helpedVal = 0.2f;
...
if (playerWins) {

   askbluaiCppIos::stageEnded(askbluai_Result_SUCCEED, askbluai_How_NORMAL, helpedVal);
}
else {

   if (large) {

      askbluaiCppIos::stageEnded(askbluai_Result_FAIL, askbluai_How_LARGE, helpedVal);
   }
   else if (close) {

      askbluaiAskBLUCppIos::stageEnded(askbluai_Result_FAIL, askbluai_How_CLOSE, helpedVal);
   }
   else {

      askbluaiCppIos::stageEnded(askbluai_Result_FAIL, askbluai_How_NORMAL, helpedVal);
   }
}

Send a “stageEnded(askbluai_Result result, askbluai_How how, float helpedVal)" event when the player finishes the stage.
To do this, call the “stageEnded(askbluai_Result result, askbluai_How how, float helped)” method.
The “stageEnded” method must be called when the current stage is really finished (when the player wins, loses or leaves), it must be associated with a “stageStarted()" event.

It has three parameters:

The ‘result’ parameter type is askbluai_Result, it must be one of the following values:

The ‘how’ parameter type is askbluai_How, it must be one of the following values:

The ‘helped’ parameter type is a float, its value must vary from 0 (the player did not use any helpers) to 1 (the player used a helper that guaranteed winning the stage).

We have defined 3 constants as an example, feel free to use them.

Additional methods

hasRequestAnswer()

bool answerReady = askbluai.hasRequestAnswer();
BOOL answerReady = [libaskbluai hasRequestAnswer];
boolean answerReady = libaskbluai.hasRequestAnswer(myActivity);
bool answerReady = askbluaiCppIos::hasRequestAnswer();

This method should be used if you used “askBLUDiff()" and want to wait for the server answer before continuing.
It will return true if the answer has been received, false otherwise.

saveMeUsed()

askbluai.saveMeUsed();
[libaskbluai saveMeUsed];
libaskbluai.saveMeUsed(myActivity);
askbluaiCppIos::saveMeUsed();

This method is used when your player fails a stage but has an opportunity to continue (not game lost yet).
If the player decides to continue, you must call “saveMeUsed()", if he decides to stop, you must call “stageEnded(askbluai_Result result, askbluai_How how, float helped)".
Here is schema showing how should be used the “saveMeUsed()" method.

stageResumed(stageTag, stageProgress)

askbluai.stageResumed(stageTag, stageProgress);
[libaskbluai stageResumed:stageTag withStageProgress:stageProgress];
libaskbluai.stageResumed(myActivity, stageTag, stageProgress);
askbluaiCppIos::stageResumed(stageTag, stageProgress);

The “stageResumed(string stageTag, float stageProgress)"" method is used only when your player resumes a stage in a new session. For instance, when the player leaves the game without finishing his stage and that the stage will be restored when the game is relaunched.

The ‘stageProgress’ parameter is a float whose value must be between 0 and 1. 0 if the player resumes a stage at the beginning of the stage, 1 if it is at the end of the stage.

purchaseConfirmed(value)

askbluai.purchaseConfirmed(askbluai_PValue.HIGH);
[libaskbluai purchaseConfirmed:kaskbluai_PValue_MEDIUM];
askbluai_PublicSettings.askbluai_PValue value = askbluai_PublicSettings.askbluai_PValue.SMALL;
libaskbluai.purchaseConfirmed(myActivity, value);
askbluaiCppIos::purchaseConfirmed(askbluai_PValue_HIGH);

The “iapConfirmed(askbluai_IAPVal value)" method should be used only when a purchase has been confirmed in an application. The “value” parameter has three possible values:

rewardVideoWatched()

askbluai.rewardVideoWatched();
[libaskbluai rewardVideoWatched];
libaskbluai.rewardVideoWatched(myActivity);
askbluaiCppIos::rewardVideoWatched();

This method should be used after a player has watched an advertising video he chose to display to get a reward.

Debug mode

The SDK Debug Mode is a feature added in the SDK since the 1.2.1 version.
It enables to get live feedbacks when you test your application.

The “initWithKey(string apiKey, bool isNewPlayer, askbluai_Mode mode)” method has a parameter called mode.
You can select an operating mode for the SDK by changing the parameter value :

Warning: askblu.ai solution will not be active with the SDK Debug Mode and will only work with the SDK Release Mode. The mode must always be set to RELEASE before submitting an application.

Activating the Debug Mode means that the SDK will now provide additional logs and give feedbacks on the correct SDK integration in your game.

On your game dashboard, go to the SDK Integration tab and check the SDK Debug Mode section.
When you play a game with the SDK Debug Mode enabled, the dashboard will be updated live with the SDK activity.

Moreover, you can also select a difficulty settings you want to test.
If you select Easier, Default or Harder, click on the UPDATE button, the SDK will be affected immediately and will return the selected answer when “getBLUDiff()” is called.
If you select Ref, the change will be effective only after you restart your game.

Example

The player launches the game for the first time, he is about to start a stage.

Before the first stage starts:

When the first stage starts:

When the first stage ends:

Before the second stage starts:

When the second stage starts:

Then the player fails the “stage2” and chooses to use a “Save Me” to continue playing:

When the “stage2” ends:

Release notes

Version 1.3.0 (7 September 2020)

New events added: purchaseConfirmed() and rewardVideoWatched(). Unity SDK Integration updated. An askblu.ai menu has been added to the Unity Window tab to ease the Unity SDK Set up.

Version 1.2.5 (16 June 2020)

New SDK Mode: “OFF mode” will disable the SDK at initialization (for instance if you prefer to turn personalization off if the player does not give consent, knowing that we do not use any personal data, all the data we receive if anonymous).
Bug fixes with XCode 11.4 simulator.

Version 1.2.4 (16 April 2020)

Detection of the application version updated.

Version 1.2.3 (25 March 2020)

Some implementation problems will be detected and warnings will be shown in the console logs.

Version 1.2.2 (14 February 2020)

“stageRespawned” method renamed to “saveMeUsed”.

Version 1.2.1 (31 January 2020)

New feature: the SDK has now a Debug mode that can be set in the “initWithKey” method. The Debug mode must only be used to check the SDK integration with the Debug Mode on the dashboard. For more information, please visit the SDK Debug mode section.
Bug fixes.

Version 1.1.0 (15 January 2020)

An “askblu.ai initialization failed” message will be displayed in the logs if the api key provided is not valid.
Update (Unity only): the developer’s custom code in the class “askbluai_Setup” has been removed from the SDK to ease SDK updates (api key and new player detection). We provide an additional file to insert once in your project.
For more information, see the Unity SDK integration section.

Version 1.0.1 (8 January 2020)

Update: The enumerator askbluai_Helped type has been removed.
The askbluai “stageEnded” method now requires (askbluai_Result res, askbluai_How how, float helped). Changed from (askbluai_Result res, askbluai_How how, askbluai_Helped helped). The “helped” parameter should now be a float from 0 (no help) to 1 (guaranteed win for the player).
New feature: the askbluai “GetBLUDiff” method will return “askbluai_Diff_REF” if the current player is a BLU passive player. The developer may use this feature if they wish to use their own settings for a stage.

Version 1.0.0 (22 November 2019)

askblu.ai official release.
Updates and optimizations.
New feature: Internal test mode will enable to play the game with a chosen difficulty.

Version 0.10.5 (05 November 2019)

Bug fix, mandatory update.

Version 0.10.2 (29 August 2019)

Minor update.

Version 0.10.1 (4 August 2019)

Bug fix, mandatory update.

Version 0.10.0 (June 2019)

askblu.ai public release.

API Reference

Select a language tab to read the matching API Reference.

public static void initWithKey (string apiKey, bool isNewPlayer, askbluai_Mode mode)

Initializes askblu.ai with an API Key and a player status.

Parameters:
apiKey - The askblu.ai API key of the game
isNewPlayer - Must return false if the player already played the game before askblu.ai integration, true otherwise
mode - the chosen operating mode for the SDK

public enum askbluai_Mode {

    RELEASE = 0, //enable the askblu.ai SDK
    DEBUG = 1,  //enable the SDK in Debug mode
    OFF = 2, //disable the SDK
};

Warning: askblu.ai solution will not be active in the SDK Debug Mode and will only work in the SDK Release Mode. The mode must always be set to RELEASE before submitting an application.



public static void resume ()

Tells askblu.ai the application has entered foreground



public static void suspend ()

Tells askblu.ai the application has entered background



public static void stageStarted (string stageTag)

Tells askblu.ai the user has started a stage

Parameters:
stageTag - the current stage unique identifier



public static void saveMeUsed ()

Tells askbluai the user stage has ended but the player used a way to continue playing the same stage



public static void stageEnded (askbluai_Result result, askbluai_How how, float helped)

Tells askblu.ai information about how the user ended the stage

Parameters:
result - the player result when the stage ended
how - how the player ended the stage, easily, normally or with difficulty
helped -  how the player was helped to finish the stage, from 0 (no helped) to 1 (guaranteed win for the player)

public enum askbluai_Result {

  FAIL = 0, //the user failed to clear the stage
  SUCCEED = 1, //the user cleared the stage
  GIVEUP = 2, //the user left the stage before he failed
  DRAW = 3, //the user didn't fail and didn't suceed
};

public enum askbluai_How {

  NORMAL = 0, //default choice
  CLOSE = 1, //the player almost won or lost
  LARGE = 2,  //the player easily won or lost
};



public static void stageResumed (string stageTag, float stageProgress)

Tells askblu.ai the user has resumed a stage in another session

Parameters:
stageTag - the current stage unique identifier
stageProgress - value between 0 and 1 corresponding to the player progression among stages



public static void purchaseConfirmed(askbluai_PValue value)

Tells askblu.ai the user has purchased

Parameters:
value - an indication on the purchase value

public enum askbluai_PValue {

    SMALL = 0, //when you estimate the purchase value is small
    MEDIUM = 1, //when you estimate the purchase value is medium
    LARGE = 2, //when you estimate the purchase value is high
};



public static void rewardVideoWatched()

Tells askbluai the user watched a video to get a reward




public static void askBLUDiff (string stageTag)

Asks askblu.ai which difficulty should be used for a defined stage

Parameters:
stageTag - the unique identifier of the chosen stage



public static bool hasRequestAnswer ()

Checks if the askblu.ai response has been retrieved from the server to the SDK
Returns true if the answer has been received, false otherwise



public static askbluai_Diff getBLUDiff ()

Gets the askblu.ai response
Returns the advised difficulty returned by askblu.ai

public enum askbluai_Diff {

  DEFAULT = 0, //no need to change the difficulty
  EASIER = 1, //the player needs an easier difficulty
  HARDER = 2, //the player needs a harder difficulty
  REF = 3, //the player is a BLU passive player
};
public static void initWithKey (string apiKey, bool isNewPlayer, bool askbluai_Mode mode)

Initializes askblu.ai with an API Key and a player status.

Parameters:
apiKey - The askblu.ai API key of the game
isNewPlayer - Must return false if the player already played the game before askblu.ai integration, true otherwise
mode - the chosen operating mode for the SDK

public enum askbluai_Mode {

    askbluai_Mode_RELEASE = 0, //enable the askblu.ai SDK
    askbluai_Mode_DEBUG = 1,  //enable the SDK in Debug Mode
    askbluai_Mode_OFF = 2,  //disable the SDK
};

Warning: askblu.ai solution will not be active in the SDK Debug Mode and will only work in the SDK Release Mode. The mode must always be set to RELEASE before submitting an application.



public static void resume ()

Tells askblu.ai the application has entered foreground



public static void suspend ()

Tells askblu.ai the application has entered background



public static void stageStarted (string stageTag)

Tells askblu.ai the user has started a stage

Parameters:
stageTag - the current stage unique identifier



public static void saveMeUsed ()

Tells askbluai the user stage has ended but the player used a way to continue playing the same stage



public static void stageEnded (askbluai_Result result, askbluai_How how, askbluai_Helped helped)

Tells askblu.ai information about how the user ended the stage

Parameters:
result - the player result when the stage ended
how - how the player ended the stage, easily, normally or with difficulty
helped -  how the player was helped to finish the stage, from 0 (no helped) to 1 (guaranteed win for the player)

public enum askbluai_Result {

    askbluai_Result_FAIL = 0, //the user failed to clear the stage
    askbluai_Result_SUCCEED = 1, //the user cleared the stage
    askbluai_Result_GIVEUP = 2, //the user left the stage before he failed
    askbluai_Result_DRAW = 3, //the user didn't fail and didn't suceed
};

public enum askbluai_How {

    askbluai_How_NORMAL = 0, //default choice
    askbluai_How_CLOSE = 1, //the player almost won or lost
    askbluai_How_LARGE = 2,  //the player easily won or lost
};



public static void stageResumed (string stageTag, float stageProgress)

Tells askblu.ai the user has resumed a stage in another session

Parameters:
stageTag - the current stage unique identifier
stageProgress - value between 0 and 1 corresponding to the player progression among stages



public static void purchaseConfirmed(askbluai_PValue value)

Tells askblu.ai the user has purchased

Parameters:
value - an indication on the purchase value

public enum askbluai_PValue {

    askbluai_PValue_SMALL = 0,   //when you estimate the purchase value is small
    askbluai_PValue_MEDIUM = 1,  //when you estimate the purchase value is medium
    askbluai_PValue_HIGH = 2,    //when you estimate the purchase value is high
};



public static void rewardVideoWatched()

Tells askbluai the user watched a video to get a reward



public static void askBLUDiff (string stageTag)

Asks askblu.ai which difficulty should be used for a defined stage

Parameters:
stageTag - the unique identifier of the chosen stage



public static bool hasRequestAnswer ()

Checks if the askblu.ai response has been retrieved from the server to the SDK
Returns true if the answer has been received, false otherwise



public static askbluai_Diff getBLUDiff ()

Gets the askblu.ai response
Returns the advised difficulty returned by askblu.ai

public enum askbluai_Result {

    askbluai_Result_FAIL = 0, //the user failed to clear the stage
    askbluai_Result_SUCCEED = 1, //the user cleared the stage
    askbluai_Result_GIVEUP = 2, //the user left the stage before he failed
    askbluai_Result_DRAW = 3, //the user didn't fail and didn't suceed
};
+ (void) initWithKey:(NSString*)apiKey withNewPlayer:(BOOL)isNewPLayer andSDKMode:(kaskbluai_Mode)mode

 Initializes askblu.ai with an API Key and a player status.

Parameters:
apiKey - The askblu.ai API key of the game
isNewPlayer - Must return false if the player already played the game before askblau.ai integration, true otherwise
mode - the chosen operating mode for the SDK

typedef NS_ENUM(NSInteger, kaskbluai_Mode)
{
    kaskbluai_Mode_RELEASE = 0, //enable the askblu.ai SDK
    kaskbluai_Mode_DEBUG = 1, //enable the SDK in Debug Mode
    kaskbluai_Mode_OFF = 2, //disable the SDK
};

Warning: askblu.ai solution will not be active in the SDK Debug Mode and will only work in the SDK Release Mode. The mode must always be set to RELEASE before submitting an application.



+ (void) resume

Tells askblu.ai the application has entered foreground



+ (void) suspend

Tells askblu.ai the application has entered background



+ (void) stageStarted:(NSString*)stageTag

Tells askblu.ai the user has started a stage

Parameters:
stageTag - the current stage unique identifier



+ (void) saveMeUsed

Tells askbluai the user stage has ended but the player used a way to continue playing the same stage



+ (void) stageEndedWithResult:(kaskbluai_Result)result withHow:(kaskbluai_How)how andHelped:(kaskbluai_Helped)helped

Tells askblu.ai information about how the user ended the stage

Parameters:
result - the player result when the stage ended
how - how the player ended the stage, easily, normally or with difficulty
helped -  how the player was helped to finish the stage, from 0 (no helped) to 1 (guaranteed win for the player)

typedef NS_ENUM(NSInteger, kaskbluai_Result)
{

    kaskbluai_Result_FAIL = 0,    //the user failed to clear the stage
    kaskbluai_Result_SUCCEED = 1, //the user cleared the stage
    kaskbluai_Result_GIVEUP = 2,  //the user left the stage before he failed
    kaskbluai_Result_DRAW = 3,    //the user didn't fail and didn't suceed
};

typedef NS_ENUM(NSInteger, kaskbluai_How)
{
    kaskbluai_How_NORMAL = 0, //default choice
    kaskbluai_How_CLOSE = 1, //the player almost won or lost
    kaskbluai_How_LARGE = 2,  //the player easily won or lost
};



+ (void) stageResumed:(NSString*)stageTag withStageProgress:(float)stageProgress

Tells askblu.ai the user has resumed a stage in another session

Parameters:
stageTag - the current stage unique identifier
stageProgress - value between 0 and 1 corresponding to the player progression among stages



+ (void) purchaseConfirmed:(kaskbluai_PValue) value

Tells askblu.ai the user has purchased

Parameters:
value - an indication on the purchase value

typedef NS_ENUM(NSInteger, kaskbluai_PValue)
{
    kaskbluai_PValue_SMALL = 0, //when you estimate the purchase value is small
    kaskbluai_PValue_MEDIUM = 1, //when you estimate the purchase value is medium
    kaskbluai_PValue_HIGH = 2 //when you estimate the purchase value is high
};



+ (void) rewardVideoWatched

Tells askbluai the user watched a video to get a reward



+ (void) askBLUDiff:(NSString*)stageTag

Asks askblu.ai which difficulty should be used for a defined stage

Parameters:
stageTag - the unique identifier of the chosen stage



+ (BOOL) hasRequestAnswer

Checks if the askblu.ai response has been retrieved from the server to the SDK
Returns true if the answer has been received, false otherwise



+ (kaskbluai_Diff) getBLUDiff

Gets the askblu.ai response
Returns the advised difficulty returned by askblu.ai

typedef NS_ENUM(NSInteger, kaskbluai_Diff)
{
    kaskbluai_Diff_DEFAULT = 0, //no need to change the difficulty
    kaskbluai_Diff_EASIER = 1, //the player needs an easier difficulty
    kaskbluai_Diff_HARDER = 2,  //the player needs a harder difficulty
    kaskbluai_Diff_REF = 3, //the player is a BLU passive player
};
public static void initWithKey (Activity activity, String apiKey, boolean isNewPlayer, askbluai_Mode mode)

Initializes askblu.ai with an API Key and a player status.

Parameters:
activity - the android activity
apiKey - The askblu.ai API key of the game
isNewPlayer - Must return false if the player already played the game before askblu.ai integration, true otherwise
mode - the chosen operating mode for the SDK

public static enum askbluai_Mode {

    RELEASE(0), //enable the askblu.ai SDK
    DEBUG(1), //enable the SDK in Debug Mode
    OFF(2); //disable the SDK
}

Warning: askblu.ai solution will not be active in the SDK Debug Mode and will only work in the SDK Release Mode. The mode must always be set to RELEASE before submitting an application.




public static void resume (Activity activity)

Tells askblu.ai the application has entered foreground

Parameters:
activity - the android activity



public static void suspend (Activity activity)

Tells askblu.ai the application has entered background

Parameters:
activity - the android activity



public static void stageStarted (Activity activity, string stageTag)

Tells askblu.ai the user has started a stage

Parameters:
activity - the android activity
stageTag - the current stage unique identifier



public static void saveMeUsed (Activity activity)

Tells askbluai the user stage has ended but the player used a way to continue playing the same stage

Parameters:
activity - the android activity



public static void stageEnded (Activity activity, askbluai_Result result, askbluai_How how, askbluai_Helped helped)

Tells askblu.ai information about how the user ended the stage

Parameters:
activity - the android activity
result - the player result when the stage ended
how - how the player ended the stage, easily, normally or with difficulty
helped -  how the player was helped to finish the stage, from 0 (no helped) to 1 (guaranteed win for the player)

public final class askbluai_PublicSettings
{
    public static enum askbluai_Result {

        FAIL(0),
        SUCCEED(1),
        GIVEUP(2),
        DRAW(3);
    }

    public static enum askbluai_How {

        NORMAL(0),
        CLOSE(1),
        LARGE(2);
    }
}



public static void stageResumed (Activity activity, string stageTag, float stageProgress)

Tells askblu.ai the user has resumed a stage in another session

Parameters:
activity - the android activity
stageTag - the current stage unique identifier
stageProgress - value between 0 and 1 corresponding to the player progression among stages



public static void purchaseConfirmed(Activity activity, askbluai_PublicSettings.askbluai_PValue value)

Tells askblu.ai the user has purchased

Parameters:
value - an indication on the purchase value

public final class askbluai_PublicSettings
{
    public static enum askbluai_PValue {

      SMALL(0),   //when you estimate the purchase value is small
      MEDIUM(1),  //when you estimate the purchase value is medium
      HIGH(2);    //when you estimate the purchase value is high
    }
}



public static void rewardVideoWatched(Activity activity)

Tells askbluai the user watched a video to get a reward




public static void askBLUDiff (Activity activity, string stageTag)

Asks askblu.ai which difficulty should be used for a defined stage

Parameters:
activity - the android activity
stageTag - the unique identifier of the chosen stage



public static bool hasRequestAnswer (Activity activity)

Checks if the askblu.ai response has been retrieved from the server to the SDK

Parameters:
activity - the android activity
Returns true if the answer has been received, false otherwise



public static askbluai_Diff getBLUDiff (Activity activity)

Gets the askblu.ai response

Parameters:
activity - the android activity
Returns the advised difficulty returned by askblu.ai

public final class askbluai_PublicSettings
{
    public static enum askbluai_Diff {

        DEFAULT(0),
        EASIER(1),
        HARDER(2),
        REF(3);
    }
}