Cocoon – Game Store

Getting Started!

Love...

Thank you for your purchasing our Cocoon – Game Store Item! 🙂

Before you can open the Construct 2 plugin you need to install all needed plugins. You can find all needed plugins in the “01_Plugin” folder. Please check always for updates!

CocoonIO

Please download the Cocoon Construct 2 plugins below. They are free.

Icon

Cocoon Construct 2 Plugins 8 MB 3598 downloads

Download the Cocoon Plugins for Construct 2 now! The download link fetches the latest...

Cordova

This template needs the premium cordova plugin package by cranberrygame. If you do not own it, please get it here.

Icon

Cranberrygame - Cordova Plugins 150 MB 2736 downloads

Download the awesome Cordova Plugin Package provided by Cranberrygame. The package...

Testing

You can test our template (also the IAP Purchases). In order to don’t get charged for the test purchase, please follow the steps below.

  1.  Becom a Beta Tester of our “Cocoon – Game Store” app (Click on Become Tester and then download the App from the Google Play Store)
  2. Contact us and provide us your Google Account (the one you used to download the app as beta tester). We will add you then as license tester. Once we have notified you, please wait 15 minutes. Then you should be able to purchase the InApp Products as Tester. Find out more here.
  3. Provide your feedback! All feedback is appreciated, so please let us know over here!

iap_test_screenshot

Functions

Now we can start explaining how it works in detail.

InApp Purchases

In order to setup the InApp purchases you must visit your Google Play Developer Console.

  Google Developer Console

Then select your app and upload an apk file with the InApp Permission included. This permission is included automatically when you have included the “CocoonInApp” plugin. Upload it as Alpha/Beta!! You can find out more about “Testing the IAP” here.

  Construct 2 - How to test InApp Products

Then switch to the “InApp Products” tab and add all needed ID’s like shown below.

cgs_iap_ID

Just to let you know...

There is no need to use the same ID’s then we did. Just don’t forget to alter the ID’s in C2 later, if you use other ID’s. Also select “Managed” as product type.

You can find the same ID’s in the “es_inapp” Event Sheet.

cgs_iap_IDs_in_c2

Product Types

  • Player Skins (not consumable, player can purchase it only once)
  • Perks (consumable, player can purchase it as often he/she likes)
  • Coin Packs (consumable, player can purchase it as often he/she likes)
  • Remove Ads (not consumable, player can purchase it only once)

Important for Coins and Perks

Due to the fact that coins and perks should be able to be purchased more than once, we need to “Consume” the purchase after it had finished. You find this function in the “es_inapp” Event Sheet at “On Purchase Succceded” (Group).

If you need a more detail guide, please see here.

  Cocoon - Install and use CocoonInApps

Basics

The game is optimized for CocoonIO and is using following Plugins.

  • Cocoon Canvas+
  • Cocoon InApp
  • Cordova Dialog
  • Cordova Chartboost

The Cocoon Canvas+ Plugin is used to detect if the game is on Canvas+. This avoids JavaScript errors during the browser preview.

Log

The game has a log function included. Whenever the variable “LOG” is equal to “1” the game will log results in the browser. This can be very useful for debugging, but you can only enter the log when you run your game in the Developer App. Please see here to find out how the Developer App works.

  How to debug a game

When your game goes live, set “LOG” to “0”. This option should be turned on only for testing.

Dialogs

The game is using the “Cordova Dialog” plugin in order to notify the Player with “Alerts” or asking him/her to “Confirm” something. In order to use this in your Android game you must install the Core Plugin “Dialogs” in your CocoonIO Projekt.

cgs_dialog_plugin

Player Selection

The Player Selection screen is using the “PlayerSkin” array in order to find out which Skin is available or not. The “PlayerSkin” array will be saved in the LocalStorage on each change. If the player tries to use an “locked” Skin he/she will be notifed by the game that this skin is locked. If he/she clicks on the “Locked” badge (round one) the player will be redirected to the store and can perform a purchase.

The player in the game will automatically have the chosen skin. All actions and events can be found in the “es_equipPlayer” event sheet.

Chartboost

The player has the opportunity to earn extra coins by watching “Rewarded Videos” or “Interstital Ads”. This service is provided by Chartboost. You find a complete guide over here.

  Cordova - Chartboost

Earnings

  • Rewarded Video: 200 Coins
  • Interstital Ad: 80 Coins

The Videos are not limited in time.

This values can be adjusted in the “es_earnCoins” Event Sheet.

Updated on May 6, 2018

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.