Pender Android for Phonegap Cordova

Discussion and feedback on Construct 2

Post » Mon Mar 25, 2013 9:04 pm

A chromium-based wrapper for mobiles initially seems like would be awesome, but what about ios? As far as I've heard, chrome on iOS is actually just a reskinning of the UI Webbview because they aren't allowed by apple to use their own JavaScript compilation methods or such. Is it just because it's a web browser that apple doesn't allow it? But if that's the case, wouldn't any game using chromium basically be a web browser, and potentially rejected as a result? Or do they not care as long as the game stays off the web and only loads local content?
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon Mar 25, 2013 9:57 pm

[QUOTE=Arima] A chromium-based wrapper for mobiles initially seems like would be awesome, but what about ios? As far as I've heard, chrome on iOS is actually just a reskinning of the UI Webbview because they aren't allowed by apple to use their own JavaScript compilation methods or such. Is it just because it's a web browser that apple doesn't allow it? But if that's the case, wouldn't any game using chromium basically be a web browser, and potentially rejected as a result? Or do they not care as long as the game stays off the web and only loads local content?[/QUOTE]

it's true, iOS has had some licence/architecture issues preventing any third party javascript engines from running in fully optimized mode.

However, a recent developer licence change, which prohibited apps from interpreting code in anything but the webview sandbox or the browser sandbox, has been lifted. This happened maybe six months ago?

Now, I very very recently came across a dude who claims to not only gotten V8 to run on iOS, but actually gotten apps based on this tech into the appstore!
https://github.com/nguyenduong/V8-iOS

I say "claims", because I haven't had a chance to test any of this myself. Suffice it to say that this is an exciting time for mobile html5 game dev!
B
4
Posts: 40
Reputation: 382

Post » Mon Mar 25, 2013 10:21 pm

Oh sweet, good news. I hope the developer's reports are true!
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Tue Mar 26, 2013 4:04 am

It's been a very interesting discussion.

As mentioned I'm going want to get an Ouya game up and running. You(Lorin) mentioned that it's easy to implement native API's. I'm assuming you mean other JAVA api's like the Ouya DK. Could you point to a simple sample at what would be involved to do such work. I sorta dropped heavy programming last year in favour of my writing(fiction and RPG's) work and then found C2 as a wonderful alternative to coding games on my own. So I'm very minimalist right now on coding :P So any direction and pointers for the right direction would be awesome.

That's an interesting and cute naming convention, but please oh please do not name anything based on Hastings :D
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Wed Mar 27, 2013 4:06 am

[QUOTE=Arima] Oh sweet, good news. I hope the developer's reports are true![/QUOTE]

Yes, me too! I've got a rather large workload, currently, but V8 on iOS has been added to the roadmap


[QUOTE=jayderyu] It's been a very interesting discussion.

As mentioned I'm going want to get an Ouya game up and running. You(Lorin) mentioned that it's easy to implement native API's. I'm assuming you mean other JAVA api's like the Ouya DK. Could you point to a simple sample at what would be involved to do such work. I sorta dropped heavy programming last year in favour of my writing(fiction and RPG's) work and then found C2 as a wonderful alternative to coding games on my own. So I'm very minimalist right now on coding :P So any direction and pointers for the right direction would be awesome.

That's an interesting and cute naming convention, but please oh please do not name anything based on Hastings :D
[/QUOTE]

In reverse order: Hastings Project...ok, now that you say that, I think it needs to happen :)

To clarify what you want to do: create an API for X (like Ouya controller) and expose it to the Pender JavaScript environment?

The Now
Pender uses Rhino for it's embedded js environment. This allows some fantastic utilities for inclusion of native (Java) code and libraries.

1. Inject a Java API into JavaScript from Native
Easily done, example of syntax here:
https://github.com/lorinbeer/pender-android/blob/master/src/com/pender/PenderCanvas.java
you'll see the implementation of the Canvas drawImage functions
https://github.com/lorinbeer/pender-android/blob/master/src/com/pender/renderer/PenderRenderer.java#L138
in setupJS, you can see the simple syntax for injecting a native class into JavaScript. Rhino does the rest. That class can now used to create JavaScript objects, and call native code.

2. Include a Java API's from inside the JavaScript Runtime
Easily done as well, example of syntax here:
https://github.com/lorinbeer/pender-android/blob/master/assets/penderandroidshim.js]penderandroidshim.js

all you do is initialize a js variable with the "Packages.java.namespace.resolver" syntax. Both native droid libraries and custom java librairies can be included this way.

The Future:

The current version of Pender uses the Rhino engine as it's embedded JS environment. This, as I have mentioned, is being replaced with V8 for superiour performance. V8 requires us to wrap api's we wish to expose in a horribly complex (I'm mean nightmarish, really) template system.
Now, the work I'm doing in VateDroid (initial dump here:
https://github.com/lorinbeer/vatedroid
addresses this. This will allow for runtime inclusion of native classes even from JavaScript!lorinbeer2013-03-27 13:50:30
B
4
Posts: 40
Reputation: 382

Post » Mon Apr 01, 2013 7:12 am

I want get more performance my game so i want try this but i dont understand how i use.Does pender work with eclipse ?.If it is possible how do i integrate? Please explain me.
B
10
S
3
G
3
Posts: 162
Reputation: 3,190

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Cryptwalker, pablo7 and 14 guests