Sunday, March 24, 2019

How to full screen scale

Here is a good tutorial:

https://www.construct.net/en/tutorials/supporting-multiple-screen-sizes-77

Summary:

Just use letter box scale.

Android Emulator for Windows

Here is a good Android emulator:

https://my.bignox.com/

How to specify alternative plugins for phonegap

This is an example of the default:

<plugin name="cordova-plugin-admob-free">


The following are alternatives:

<plugin spec="https://github.com/mukeshphulwani66/admob-fixing-cordova.git" source="git">

Reference:

http://docs.phonegap.com/phonegap-build/configuring/plugins/




Saturday, March 23, 2019

How to add admob to your Construct 2 game

Now that cocoon.io is dead, we have to use phonegap for admob.

Follow this youtube video instructions:

https://www.youtube.com/watch?v=Idiz1QaS_EY

Download the admob plugin mentioned therein:  http://tinyurl.com/h6phjon
Copy the plugin to your Construct 2 plugin folder.

Then:

Step 1: Insert admob plugin v 1.0 , also your banner and interstitial ad ids from here:


 Also, in the properties section, set Test mode to True. 



Step 2: Create Admob sheet with these functions:



Step 3: Call your ads in the on start layout event





Step 4: Export a cordova project with these settings:


Step 5:  Delete the config.json file in the exported folder
Step 6:  Edit your config.xml:


Step 7:  Create a github repo and push it there.
Step 8:   Create a new app in your build.phonegap.com console and insert the github repo .git file ref
Step 9:   Build the apk and transfer to your Android phone


Note:
There is a secondary youtube video here:  https://www.youtube.com/watch?v=ZBa2sCFAAuY

But it does not work for banner ads because the guy is using AdmobPlugin v1.2

Only v 1.0 works.




How to export cordova project and build apk in phonegap

In Construct 2, you only need .ogg files for Android:


Then, export as Cordova project with this settings:


And these are the exported files:


No need config.json.

Then, push to github and then create new app in build.phonegap.com:


Everytime you make any changes, just push to github again, then click on Update Code to rebuild.





Thursday, March 21, 2019