beocat / mamau_chartboost

Chartboost for Godot Game Engine - Android & iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MamauChartboost

This is an implementation of the Chartboost Api for the Godot Engine (https://github.com/okamstudio/godot)

The module works for both Android and iOS and has been tested with Godot 2.0.2.

Example project can be found in the mamau_chartboost_example folder.

General Setup

  1. Add the folder mamau_chartboost to the modules folder.
  2. Download and expand the SDK for the platform you would like to use.

Android

  1. From the Android SDK Manager, make sure you have the following installed:
  2. Android Support Repository
  3. Android Suppport Library
  4. Google Repository
  5. Add the file chartboost.jar from the SDK to the android/lib folder
  6. Add the module in the engine.cfg
[android]
modules="org/godotengine/godot/MamauChartboost"
  1. See chartboost.com for required and optional permissions

iOS

  1. Add the Chartboost.Framework from the SDK to the ios/lib folder

Simplify appID and appSignature (Optional)

If using the module on both platforms, it is possible to let Godot take care of getting the correct appId and appSignature. This can be done by specifying them in engine.cfg like this:

[mamau_chartboost.Android]
app_id="xxxxxxxxxxxxxxxxxxxxxxxx"
app_signature="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

[mamau_chartboost.iOS]
app_id="xxxxxxxxxxxxxxxxxxxxxxxx"
app_signature="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Then you can initialize Chartboost like this:

var chartboost

if(Globals.has_singleton("MamauChartboost")):
		chartboost = Globals.get_singleton("MamauChartboost")
		chartboost.init(Globals.get("mamau_chartboost/app_id"), Globals.get("mamau_chartboost/app_signature"))

API Reference

void init(String appId, String appSignature) #Always start by calling init

void cache_interstitial()
bool has_interstitial()
void show_interstitial()

void cache_reward_video()
bool has_reward_video()
void show_reward_video()

void cache_more_apps()
bool has_more_apps()
void show_more_apps()

bool get_auto_cache_ads()
void set_auto_cache_ads(bool auto_cache_ads)

void set_should_request_interstitials_in_first_session(bool should_request)

About

Chartboost for Godot Game Engine - Android & iOS

License:MIT License


Languages

Language:Java 39.0%Language:Objective-C++ 34.8%Language:GDScript 11.4%Language:C++ 8.8%Language:Python 5.3%Language:C 0.7%