Pender Project - Android Accelerated Canvas

Discussion and feedback on Construct 2

Post » Wed Mar 20, 2013 5:14 am

Hey folks,

About a month ago, I was contacted by a member of your forums concerning the Pender Project. What's a Pender? A few of the highlights:

  • fast DOM-less JS execution environment
  • Hardware acceleraned graphics through a HTML5 Canvas API
  • Supports multitouch events
  • compatible with PhoneGap/Cordova


In a mouthful: Pender exposes a hardware accelerated HTML5 Canvas API to a pure javascript environment. Write an app purely in javascript, and the Pender API run it on any droid device running OS 8 and up.

Pender is compatible with PhoneGap/Cordova, allowing several use cases:

  • Cordova Drives - embed a canvas element as if it were a native canvas
  • Pender Drives - leverage the Cordova WebView for GUI control of your app


You can find the project here:
https://github.com/lorinbeer/pender-android

requirements:
  • updated android sdk on your path
  • unix shell or equivalent (cygwin for windows)
  • null


getting started:
  • clone the repo:
    git clone https://github.com/lorinbeer/pender-android
  • navigate to the tools directory:
    cd pender-android/tools
  • run the create script:
    ./create -c



The script will dump out what it's doing on the terminal, which is a lot.
It:
      

  • finds latest android version installed on your system

  • creates an Android Library Project, and copies over source

  • downloads static library dependencies
  • creates a Pender Example project
  • updates example project with PenderLibrary link
  • null


All you need to do is replace the MainActivity class in the example project with something like the following

package com.pender.client;

import android.app.Activity;
import android.os.Bundle;


import com.pender.Pender;

public class PenderActivity extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        mPender = new Pender(this);
        mPender.init();
    }

    private Pender mPender;    
}


The build tooling has a lot of options. "-c" indicates that it should build a "client" project. Please not that using many of the options (like specifying a path) will break portions of the build. That's ok. Ping me when you come across something, or report an issue on github, and I'll get to it asap. Or better yet, fix it and send me a pull request!

This seems like a great community, and I'm looking forward to working with you!lorinbeer2013-03-20 07:37:33
B
4
Posts: 40
Reputation: 382

Post » Thu Mar 21, 2013 1:42 am

@lorinbeer This is great! Thank you for bringing the Pender Project to the Construct 2 community.

Speeking for myself an open source Android accelerated canvas for PhoneGap has been highly anticipated. But for all the Ouya developers here this sounds like one of the solutions that they have all been hoping for.

I have some questions on the current build process. I posted them here:

http://www.scirra.com/forum/pender-android-for-phonegap-cordova_topic63245_post400145.html?KW=#400145

Thank you for all the hard work you have done on this project it is much appreciated, and welcome to the Construct 2 community
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Thu Mar 21, 2013 2:22 pm

@Wink

Thanks Wink! I really appreciate the interest some of the users here have shown in Pender. You've got some passionate, smart people. @ArcadEd really went outside his comfort zone in getting Pender running on a windows machine, but he's a top notch dude. After that experience, I recognized the needs of the community here, and created a Pender.jar distributing hosted on bitbucket: https://bitbucket.org/lorinbeer/pender/downloads
Just drop that into an Android project, add it to the build path, and you have access to the Pender API.

Over the coming weeks, we'll work on getting Construct2 and Pender playing together. There is a large body of experimental work behind Pender, and I have high hopes for compatibility. I have experience doing this sort of thing, and am working with Uxebu on getting Bonsai.js working inside Pender as well. Note that no change to Construct2 will be necessary for the proof of concept I'll make, just a javascript shim. When that's successful, I'll bounce it past @Ashley and see if he's interested in further collaboration!

Lot's more to come!
B
4
Posts: 40
Reputation: 382

Post » Thu Mar 21, 2013 4:29 pm

Exciting!
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Thu Mar 21, 2013 6:19 pm

@Lorinbeer

Since you mentioned pender was a plugin for Cordova. Does that mean if I currently have an entire project built in eclipse with Phonegap, I can just add in the plugin?
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Fri Mar 22, 2013 4:20 am

Demos? :)
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Mon Mar 25, 2013 2:13 pm

[QUOTE=Joannesalfa] Demos? :)[/QUOTE]

Demos:

https://github.com/lorinbeer/pender-demos

this currently contains the render stress test "client" demo. It is also embedded in the pender-android repo.

We are currently working on additional game demos and demo videos, I'll post those when their up!
B
4
Posts: 40
Reputation: 382

Post » Mon Mar 25, 2013 3:59 pm

[QUOTE=ArcadEd] @Lorinbeer

Since you mentioned pender was a plugin for Cordova. Does that mean if I currently have an entire project built in eclipse with Phonegap, I can just add in the plugin?[/QUOTE]

@ArcadeEd

yessir! Although, in order to use the Pender Canvas API, you would have to modify your project slightly in order to make use of the plugin.
B
4
Posts: 40
Reputation: 382

Post » Mon Mar 25, 2013 6:42 pm

This is looking like a serious contender! The flexibility of Cordova with a kickass framerate to boot. Definitely keeping an eye on this!
B
31
S
11
G
7
Posts: 197
Reputation: 6,682


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests