Pender Android for Phonegap Cordova

Discussion and feedback on Construct 2

Post » Wed Mar 20, 2013 5:03 pm

[QUOTE=Ashley] It's difficult for us to support DOM-less engine. We see DOM-less as a disadvantage, not an advantage, because we support so many features that happen in the browser layer such as WebGL, Web Audio API, WebSockets, etc. etc.[/QUOTE]
@Ashley


Hey Ashley!

I wouldn't expect Construct 2 to run in Pender in it's entirety. I have some experience embedding existing projects in Pender, including work for Zynga (not public unfortunately) and Bonsai.js from uxebu.

Two easy ways are:

1. Construct2Shim.js: which would redirects canvas calls through a messaging api to Pender, not as optimized as a full renderer running in Pender, but tests still indicate a massive jump in framerate and rendering performance. Easy to implement, with no change to ConstructJS, just a shim to be loaded in the WebView

2. Construct2Pender.js: which would define a tiny rendering engine using the graphics calls Construct2 expects to exist in the WebView. Instead of calling a canvas in the main Construct2 runtime, we would call Pender through the bridge, using an abbreviated syntax which would update the rendering engine.

Note that Pender can include any functionality that the device supports, exposed under any api we want. The Pender roadmap includes support for Web Audio and WebGL!


To echo your points, the DOM is most certainly an advantage when it comes to layout and the breadth of api's available. However, it kills rendering speed even when hardware acceleration is implemented in the browser. Decoupling the rendering engine is not only good architecture, but it allows a paper thin layer between the js and the native graphics calls, really bridging the gap between js graphics and native graphics.

One of the use cases of Pender is to provide embedded canvases in a Cordova/PhoneGap project, using the Pender runtime as a rendering engine for fast canvas, and not as a replacement for all that HTML5 offers.lorinbeer2013-03-20 17:06:49
B
4
Posts: 40
Reputation: 382

Post » Wed Mar 20, 2013 8:31 pm

@lorinbeer Sorry I am coming into this late, what platforms are supported, any issues with Windows 8/Windows Phone 8 apps?
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Wed Mar 20, 2013 9:51 pm

[QUOTE=BluePhaze] @lorinbeer Sorry I am coming into this late, what platforms are supported, any issues with Windows 8/Windows Phone 8 apps?[/QUOTE]

no worries, never too late!

Windows8 Phone apps are not currently on our roadmap. They could be added, but the underlying tech would be different. If interest grows, we can certainly explore Windows Phone 8 Pender!
B
4
Posts: 40
Reputation: 382

Post » Wed Mar 20, 2013 11:56 pm

@lorinbeer Wow! I just got your email. Sorry Iv been away the last couple of days I was in Chicago on business. I cant believe I missed all of this.

I'm glad to see your surgery went well from looking at that picture it looks like you had neck surgery. ouch!

From reading through all the posts it looks like we have to build this manually? Are you planning on adding some native windows build tools?

The reason I ask this is because most of the Construct 2 users here are non programmers, and might find the process a little bit overwhelming. I don't know if you have had a chance to take a look at Construct 2 yet but @Ashley has built it so that non programmers can build games by only using actions, and events.

But once I get my head around the process, and successfully build a game with it. Maybe I or @ArcadEd could make a dumbed down tutorial with pictures of the whole process. lol

speaking of which?

@ArcadEd Since you have already been through this could you dumb down a few things for me

For the first few steps are you using Git Bash for your command prompt? If so did you use Git Bash for executing all the commands or did you use the android sdk/tools command prompt for some things? I haven't tried this yet, and I am a little confused after reading through the manual build process on what you used for each step.

And by the way thank you for doing all of this in public. I know this will help every one to understand the process better. Especially those that are to shy to post.


[QUOTE=lorinbeer]

@Ashley


Hey Ashley!

I wouldn't expect Construct 2 to run in Pender in it's entirety. I have some experience embedding existing projects in Pender, including work for Zynga (not public unfortunately) and Bonsai.js from uxebu.

Two easy ways are:

1. Construct2Shim.js: which would redirects canvas calls through a messaging api to Pender, not as optimized as a full renderer running in Pender, but tests still indicate a massive jump in framerate and rendering performance. Easy to implement, with no change to ConstructJS, just a shim to be loaded in the WebView

2. Construct2Pender.js: which would define a tiny rendering engine using the graphics calls Construct2 expects to exist in the WebView. Instead of calling a canvas in the main Construct2 runtime, we would call Pender through the bridge, using an abbreviated syntax which would update the rendering engine.

Note that Pender can include any functionality that the device supports, exposed under any api we want. The Pender roadmap includes support for Web Audio and WebGL!


To echo your points, the DOM is most certainly an advantage when it comes to layout and the breadth of api's available. However, it kills rendering speed even when hardware acceleration is implemented in the browser. Decoupling the rendering engine is not only good architecture, but it allows a paper thin layer between the js and the native graphics calls, really bridging the gap between js graphics and native graphics.

One of the use cases of Pender is to provide embedded canvases in a Cordova/PhoneGap project, using the Pender runtime as a rendering engine for fast canvas, and not as a replacement for all that HTML5 offers.[/QUOTE]

@Ashley What do you think?

For myself an open source Accelerated Canvas solution for PhoneGap has been highly anticipated. But for all of the Ouya developers this sounds like the only solution available right now.

Is there any chance this could be officially supported?

The reason I ask is CocoonJS is DOM-less, and I was just hoping some kind of exporter similar to CocoonJS's could be easily integrated into Construct 2 without to many problems. This is just more of a hopeful request than anything Wink2013-03-21 00:45:03
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Thu Mar 21, 2013 2:03 am

I just used windows command prompt from the droid sdk tools directory.
I will try to dumb it down a bit. I was waiting to see what Lorin was going to pull out in the next day or so. He said he was going to work on a windows script and a jar to just include in eclipse.
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Thu Mar 21, 2013 2:49 am

@Wink
@ArcadEd

I develop in unix environments: linux distros and osx. So terminal/bash are what I use for all the commands shown. Cygwin might tie you over, but the real solution is a windows version of the build tool. This will take a little while, as I have other duties related to phonegap/cordova

Early this morning, I uploaded a precompiled Pender.jar file to the bitbucket downloads section:
https://bitbucket.org/lorinbeer/pender/downloads

1. Drop the Pender jar AND the rhino jar into your app's 'libs/' folder
2. right click on jars in eclipse and choose "add to build path"
3. use something like what I gave ArcadEd for the main activity
4. copy in the contents of the assets directory from the root of the git repo to the assets directory of the eclipse project
5. Run it!

After that, you should be able to play around with the penderdemo.js file to get different render results, specify different art resources, etc
B
4
Posts: 40
Reputation: 382

Post » Thu Mar 21, 2013 2:51 am

Ok, a windows version of the build tool should make the build process as easy as 1,2,3.   

In the meantime I will give your precompiled Pender.jar file, and instructions a try.

Thanks again for all your hard work    Wink2013-03-21 03:10:58
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Thu Mar 21, 2013 3:00 am

If I have the time in the next week I could easily write a gui based solution in .net that simplifies the process.
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Thu Mar 21, 2013 8:19 am

I've barely looked into Pender, just gandered through some of the files a few weeks ago. However I have a few questions.

1. Pender is mentioned to support PhoneGap. Does this mean that Pender can be independent of PhoneGap? Can I just use Pender files to run C2 game.

2. Would it be difficult to implement the Ouya DevKit controller api and IAP. I'm working on an Ouya game and want to make the most minimal effort in regards to persona programming to get my first game out there.

3. Is there enough to get C2 going now?

4. Why is it called Pender?

@ArcadeEd
That would be fantastic. I dislike dealing with command line these days. i've gotten lazy :Pjayderyu2013-03-21 08:20:14
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Thu Mar 21, 2013 1:23 pm

[QUOTE=ArcadEd] If I have the time in the next week I could easily write a gui based solution in .net that simplifies the process.[/QUOTE]

I think that's a great idea, @ArcadEd! Once you have an executable, I would accept it into the github repo or the static downloads. That would make you an official Pender contributor!

I can write the backend in a windows script that your gui can hook into.lorinbeer2013-03-21 13:51:52
B
4
Posts: 40
Reputation: 382

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests