Pender Android for Phonegap Cordova

Discussion and feedback on Construct 2

Post » Mon Feb 11, 2013 8:46 am

@ArcadEd Yes, thanks for the Git link. I actually already had Git installed on my PC for years now that's how I cloned the repository using Git's Git Gui. But after reading your posts I realized what I was doing wrong.

I was trying to execute the build command through windows command prompt. lol Know wonder it wasn't working usually when I pull source code from GitHub I edit, and build the solution in visual studios. I completely forgot about Gits Git Bash command prompt.

Anyway, so once I cloned the repository I opened up the new pender-android folder it created, right clicked on the tools folder, opened the Git Bash command prompt, typed ./pendertools, hit enter, and it built the PenderAndroidLibrary right inside of the tools folder. Simple as that   

Now the problem is how to incorporate it since there is no real documentation on how to do that.

It says:

"On Android/iOS, the Pender Client is dropped into a project container, and Pender supplies the necessary js hooks."

Could it really be just that easy? I mean how would you do this? Import it into Construct 2's game file system? Or try to figure out were to put everything inside of Eclipse?

Hmm, any suggestions?
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Mon Feb 11, 2013 3:36 pm

It works!

OK, after doing an extensive search through the deep dark hidden corners of the internet looking for any type of a hint on how to implement this I came across an email in Adobes email past-bin. Pender said to Adobe that the simplicity of pender is that it gets baked into the project so that the user doesn't have to touch anything but the JavaScript of there own project.

So I used a not so optimized earlier version .capx of my game Falling Fruit Frenzy, exported it from Construct 2 for PhoneGap, zipped it up, named it app.zip, placed it on my C: drive, opened up the pender-android folder, right clicked on the tools folder, opened the Git Bash command prompt, typed ./pendertools -p C:/app.zip, hit enter, and it baked it right into my app.zip folder.

I then made another export from the same .capx, zipped it up and left it as is. Then I ran some tests using PhoneGap Build. Here are the results:

Tested on Samsung Galaxy S3

Without Pender:

Here is a screenshot from my phone. Notice how web font works in the upper left corner. Also notice in the bottom right corner It says 39 fps, with 24 objects on the screen most of them moving at angles.



With Pender:

Notice how the web font doesn't work anymore just like CocoonJS. Also notice the increase in fps. 50 fps with 31 moving objects. That's a gain of 19 fps.



I bet if you built this in eclipse it would even be faster.

Still though my game using CocoonJS runs 60, to 62 fps on the same phone so IMO Cocoon is still superior.

I would like to see what other peoples games are getting for performance with Pender. Please give it a try and post your experiences here. Wink2013-02-11 15:41:33
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Mon Feb 11, 2013 3:47 pm

@Wink
That's awesome. I'm running into an issue just getting Pender. Any advice?

Using: git clone git@github.com:lorinbeer/Pender-android.git

Cloning into 'Pender-android'...
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

ThanksArcadEd2013-02-11 15:53:36
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Mon Feb 11, 2013 4:18 pm

OK, so I got it installed. Always love learning new stuff :).

Anyway, now when I try to build with Pender I get

$ ./pendertools -p /c/java/kaplow-pend.zip
PenderTools: Creating Library Project
./pendertools: line 81: android: command not found
grep: invalid option -- o
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

android create lib-project --name Pender --target 0 --path /c/java/kaplow-pend.z
ip/PenderAndroidLibrary --package com.pender
./pendertools: line 73: android: command not found

I don't expect you know how to help with this, but figured I would post it up :).
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Mon Feb 11, 2013 4:23 pm

@ArcadEd Sure just:

1. Make a new folder on your desktop, and name it anything you want.

2. Right click on your folder then select Git GUI Here.

3. When git opens select Clone Existing repository.



4. Go to https://github.com/lorinbeer/pender-android, and copy the Git Read-Only link to notpad. Git wont let you past so you will have to type the link into git.



5. In Git's new window type that link in were it says Source Location. Then click on Browse by the Target Directory field, navigate to your newly created folder select it, Then add this to the end of it /pender-android, and select Clone.



6. When it's finished a new window will open.



You can close it. And that should do it.

If your still having problems with it you can just click on the zip download button on the
https://github.com/lorinbeer/pender-android page. The button is located next to the Git Read-Only link. This is not a good idea though because you might not get the latest code (depending on the developer), or sometimes a corrupt file.Wink2013-02-11 16:26:25
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Mon Feb 11, 2013 4:33 pm

[QUOTE=ArcadEd] OK, so I got it installed. Always love learning new stuff :).

Anyway, now when I try to build with Pender I get

$ ./pendertools -p /c/java/kaplow-pend.zip
PenderTools: Creating Library Project
./pendertools: line 81: android: command not found
grep: invalid option -- o
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

android create lib-project --name Pender --target 0 --path /c/java/kaplow-pend.z
ip/PenderAndroidLibrary --package com.pender
./pendertools: line 73: android: command not found

I don't expect you know how to help with this, but figured I would post it up :).[/QUOTE]



Ya, I got the same but it still worked. That might have something to do with C2's runtimejs file, web font, something else in our games that it doesn't support yet, or maybe that's why it's still in beta.
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Mon Feb 11, 2013 5:02 pm

How can you tell if it's been injected?
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Mon Feb 11, 2013 5:10 pm

This sounds like exactly what CocoonJS does. If you try to run from within PhoneGap's webview, you run in to serious performance issues with communicating with the webview. (I know about this since I went as far as making a plugin to enable WebGL support in PhoneGap, but it performed terribly - the overhead of communicating with PhoneGap made it slower than software rendering.) Perhaps this is why CocoonJS is still faster.

Still, it might be nice for making PhoneGap better than it currently is.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Mon Feb 11, 2013 5:16 pm

@ArcadEd I wasn't sure if it was either since there is no real conformation message in the prompt. Well that and the errors. That is why I made 2 versions of my game to test against each other, and as you can see from the screenshots there is a definite difference in fps, and it doesnt support web font just like CocoonJS. Maybe you should do the same and add some web font to your game just to make sure.

@Ashley I was hoping you would notice this thread. It would be great if you could take a look at it. I cant find much documentation on this, and it would be great if you could get PhoneGap better than it currently is. Wink2013-02-11 17:23:00
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Mon Feb 11, 2013 5:20 pm

OK, I was just checking because my ZIP file modified date didn't change at all.

I'm going to follow your steps first (I was using Github for windows before and not cygwin) and see what it does.

@Ashley
I do love CocoonJS and what they have accomplished. I just don't like their splash screen and monetizing options (mopub). That is why I like to build in eclipse, so I can manually add the admob sdk.

If Cocoon every went to native admob and iads support, plus removed the cocoon splash screen, I would just do it that way. I would even pay for the service when/if they offer it.
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests