Experiment running a game on an Android

Discussion and feedback on Construct 2

Post » Sun Aug 07, 2011 6:10 pm

Firstly just wanted to say that I'm really enjoying using Construct.

Secondly I was experimenting publishing apps created with Construct2 on Android. I don't own an Android phone but was able to get a simple game running on an Android emulator. I used a free software package called PhoneGap it let's you take a peice of HTML5 can publish it on Android, iPhone, etc as a standalone package (I.e. no webserver required). I thought I'd share the experince as it seems like a nice way to publish Construct2 games on various platforms.

Here's a pic of the proof of concept game running on the Android emulator:


Here's what
I followed these instructions to get the helloworld example running

Tested the hellow world app

I then exported my game to HTML and coppied the files over to my Eclipse workspace replacing the index.html created in the hellowworld example.

I then tested my app, volla it works.

4 hickups I had along the way:

1. Android SDK didn't detect my Java SDK install, if that happends just click "back" and "next" again on the installer.

2. The android SDK installed in c:\program files(x86)\android-sdk by default for me. When you are entering the path of your Android SDK in Eclipse you need to use C:\PROGRA~2\Android\android-sdk cause it didn't like the spaces.

3. When I re-ran the app on the Android emulator I just got my original HelloWorld example again. Not sure what went wrong but I deleted the Virtual Device in the AVD Manager and created a new one.

4. By the way the Android emulator can take ages to boot up 2-3mins, I thought it was broken the first time but it was just slow.


B
15
S
1
G
3
Posts: 47
Reputation: 1,912

Post » Sun Aug 07, 2011 6:12 pm

Hmm not sure why the lick to the pic didn't work but here it is again:

http://twitpic.com/62iyoh
B
15
S
1
G
3
Posts: 47
Reputation: 1,912

Post » Sun Aug 07, 2011 6:39 pm

I tried this with a friend's phone, and on the phone itself the performance was terrible. I'm assuming with android phones, like with iOS, HTML5 isn't yet hardware accelerated. Hopefully with iOS 5, soon android will hardware accelerate HTML5 as well.

It was a while ago that I tried it though. Perhaps they already have HW accelerated HTML5. Anyone know?Arima2011-08-07 18:42:30
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Sun Aug 07, 2011 7:07 pm

@ShabbyCat thanks for the writeup!

I think hardware acceleration on Android is a bit more complicated than on iOS. iOS always runs on the same Apple hardware and the hardware is pretty good performance for mobile devices. Android runs on any old phone that the manufacturers make (many cheaper than Apple's), and might have issues with some phones either not having the necessary hardware, or having it but still being ridiculously slow. So I have a feeling canvas performance will take a little longer to "mature" on Android.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon Aug 08, 2011 7:24 am

All versions of Android since Android 1.0 have had embedded OpenGL support on all phones. I think hardware acceleration depends on the phone hardware (any mediumly priced phone and up should have it), however I think all Android 3.0 phones will have hardware acceleration too.
B
3
S
1
G
3
Posts: 49
Reputation: 1,148


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests