Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Contributor
Posts: 10
Registered: ‎11-30-2011
My Device: curve 8520
My Carrier: telcel

Pong game in HTML5, not works on Playbook (using SGF, from book "Learning HTML5 Game Programming")

Hi. I´m reading the book "Learning HTML5 Game Programming". In chapter 4 we program a game using the "Simple Game Framework" (SGF): Pong. When I execute the game in the ripple emulator (Ripple 0.9.4.1) the game works ok but when I deploy the game in the virtual Playbook (with BlackBerry WebWorks SDK for TabletOS 2.2.0.5) the game not works, only shows a blank square.

What is wrong? permissions?

The code for your review is here: https://github.com/oresistemas/samples/tree/master/Pong

 My config.xml is:


<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets"
    version="1.0.0.0">
    <name>Pong</name>
    <description>
        A sample application to demonstrate some of the possibilities.
      </description>
    <author>
        CESAR
    </author>
    <license>
        Example license.
      </license>

    <feature id="blackberry.ui.dialog"/>
    <feature id="blackberry.app.event"/>
        
    <content src="index.html" />
    <icon rim:hover="false" src="icon.png"/>

</widget>

 

 

Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: Pong game in HTML5, not works on Playbook (using SGF, from book "Learning HTML5 Game Programming")

Well, there's a lot to debug in there, but I was able to get it to paint simply by connecting over WebInspector and using the Console to run location.reload()

 

Once I did that, it started painting the canvas portion, though it was not responding to any other input.

Tim Windsor
Open Source Technical Lead
Contributor
Posts: 10
Registered: ‎11-30-2011
My Device: curve 8520
My Carrier: telcel

Re: Pong game in HTML5, not works on Playbook (using SGF, from book "Learning HTML5 Game Programming")

Thanks for your help!!!
One question, what version of the simulator did you use?
Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: Pong game in HTML5, not works on Playbook (using SGF, from book "Learning HTML5 Game Programming")

I was using a real device actually. with the 2.1.0 beta software. You can try with that simulator if you want - it's right here: https://developer.blackberry.com/devzone/resources

Tim Windsor
Open Source Technical Lead