How do I create android game

Get help using Construct 2

Post » Sun May 10, 2015 8:26 pm

Hi, I'm new to c2. Just tried a tutorial. For export, I don't see Android (.apk) option. How can I create a .apk for publishing to such stores as Google Play Store?

Thanks
B
3
Posts: 8
Reputation: 191

Post » Sun May 10, 2015 8:31 pm

There are many ways. The recommended option for Android is by exporting it using cordova then create the APK with intel XDK crosswalk.
B
54
S
23
G
12
Posts: 746
Reputation: 11,908

Post » Sun May 10, 2015 8:56 pm

The following blog post from Ashley covers the current export options:

https://www.scirra.com/blog/154/evolving-construct-2s-export-options
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,375
Reputation: 58,432

Post » Sun May 10, 2015 9:03 pm

Thanks for quick replies. Will check into them.

-Hossein.
Amerkashi.Wordpress.com
B
3
Posts: 8
Reputation: 191

Post » Sat May 16, 2015 8:17 pm

I tried to create a simple Android app that uses WebView to load local file; c2 index.html. My thinking is to use this approach to load the html5 c2 exported app using WebView. A WebView can load a local file using file:/// protocol. However, c2 checks to see if protocol is file:/// and it will show error message. Is there anyway to overwrite this default behaviour?

THANKS
B
3
Posts: 8
Reputation: 191

Post » Sun May 17, 2015 2:48 pm

kkashi wrote:I tried to create a simple Android app that uses WebView to load local file; c2 index.html. My thinking is to use this approach to load the html5 c2 exported app using WebView. A WebView can load a local file using file:/// protocol. However, c2 checks to see if protocol is file:/// and it will show error message. Is there anyway to overwrite this default behaviour?

THANKS


Maybe my tutorial will help you ;)
http://help.shatter-box.com/wiki/intel-xdk-how-to-build-to-android-with-crosswalk/
Image Image iTunes: Match3 | Google Play: Match3
B
98
S
33
G
30
Posts: 1,117
Reputation: 27,781

Post » Sun May 17, 2015 2:57 pm

AndreasR wrote:
kkashi wrote:I tried to create a simple Android app that uses WebView to load local file; c2 index.html. My thinking is to use this approach to load the html5 c2 exported app using WebView. A WebView can load a local file using file:/// protocol. However, c2 checks to see if protocol is file:/// and it will show error message. Is there anyway to overwrite this default behaviour?

THANKS




@AndreasR, Thanks for your reply. I'm looking for alternative approaches. The problem with cordova, xdk crosswalk is that it makes the .apk huge (+20mb). Does anyone know how to get an Android WebView work with c2 exported html5 output? As stated previously, since protocol is file:/// c2 will not start-up the app
http://stackoverflow.com/questions/2087 ... ew-android

Thanks
B
3
Posts: 8
Reputation: 191

Post » Sun May 17, 2015 3:00 pm

kkashi wrote:@AndreasR, Thanks for your reply. I'm looking for alternative approaches. The problem with cordova, xdk crosswalk is that it makes the .apk huge (+20mb). Does anyone know how to get an Android WebView work with c2 exported html5 output? As stated previously, since protocol is file:/// c2 will not start-up the app
http://stackoverflow.com/questions/2087 ... ew-android

Thanks


Actually yes.

2)Crosswalk android

c2 Phonegap WebViewPlus plugin (half size of crosswalk for android)
+
c2 Phonegap Media plugin (sound)
+
c2 Export project - Cordova
+
xdk Build - Android

See here: https://plus.google.com/102658703990850475314/posts/f3jYgyjAcjV

You'll find all plugins here: http://cranberrygame.github.io/?referrer=c2gpluscommunity
Image Image iTunes: Match3 | Google Play: Match3
B
98
S
33
G
30
Posts: 1,117
Reputation: 27,781

Post » Sun May 17, 2015 3:03 pm

About webview:

By default, a WebView provides no browser-like widgets, does not enable JavaScript and web page errors are ignored. If your goal is only to display some HTML as a part of your UI, this is probably fine; the user won't need to interact with the web page beyond reading it, and the web page won't need to interact with the user. If you actually want a full-blown web browser, then you probably want to invoke the Browser application with a URL Intent rather than show it with a WebView.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun May 17, 2015 3:12 pm

Please take a look at my html5 JunglePerformer here: http://3nportal.com/temp/jp
I wrapped that into Android webview (.apk here: http://3nportal.com/temp/jp/jp.apk ) yielding much smaller .apk
The two boxes on top left/right are for touch/mouse buttons (I was lazy and didn't add in images).
However, as you notice, on Android performance is slow because its communicating with files over the net.
This is why I wanted to wrap the files locally into .apk

-Hossein.
B
3
Posts: 8
Reputation: 191


Return to How do I....?

Who is online

Users browsing this forum: db3344, leena222, mindragon73, Yahoo [Bot] and 17 guests