Export to windows phone 7?

0 favourites
  • 8 posts
  • Hello to everyone

    I bought Construct 2 some weeks ago, is a fantastic (under development) software!

    since I'm owner of a Windows Phone i want try the phoneGap exporter.

    I already have Visual studio 2010 with WP7 SDK, i dowloaded phoneGap template ( phonegap.com/start ), then i imported a simple Construct's project (a simply rotating sprite previously exported with phoneGap format).... but... it doesn't work!

    The application start with a PhoneGap logo then white screen :(

    I also watch into construct-generated-folder and i found a curious thing. The auto-generated xml "config.xml" contains

         <author href="http://test.t" email="test@test.test">test</author>     <gap:platforms>
              <gap:platform name="ios" />
              <gap:platform name="android" minVersion="4" />
              <gap:platform name="webos" />
              <gap:platform name="symbian.wrt" />
              <gap:platform name="blackberry" project="widgets"/>
         </gap:platforms>
    

    ...Without any reference to windows phone platform!

    What's wrong? <img src="smileys/smiley19.gif" border="0" align="middle" />

    PS:

    Sorry for my poor english, i'm italian :P

  • We won't support it officially until PhoneGap Build support it, and they don't seem to do Windows Phone builds there yet. I'll keep an eye out but let me know if you notice they've started doing it!

  • Hello tatogame

    I think the reason your getting a blank screen is because of the auto-generated xml. Like Ashley said C2 only supports the PhoneGap Build. So your stepping into untested territory with PhoneGap for Windows Phone 7.

    I haven't tried it yet but I bet if you export your game from Construct 2 as a "HTML5 web site" instead of a "PhoneGap" export, and drop it into the ?www? directory you will get a better result.

    Here is a more detailed tutorial on using PhoneGap for Windows Phone 7:

    Tutorial: how to create HTML5 applications on Windows Phone thanks to PhoneGap

    I hope this helps. If you get it working please let us know how you did it. I would like to get my games working on as many devises as possible. <img src="smileys/smiley1.gif" border="0" align="middle">

  • I am able to compile something with this procedure

    PhoneGapWikiWP7

    but (as wink suggest) in HTML5 web site mode, then i changed the index.html code in something like

    <!DOCTYPE html>
    <html>
      <head>
        <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
        <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
        
        <title>PhoneGap WP7</title>
        
           <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
        <style type="text/css">
          * {
          padding: 0;
          margin: 0;
          }
          canvas {
          position: fixed;
          }
        </style>
    
        <script type="text/javascript">
          // provide our own console if it does not exist, huge dev aid!
          if(typeof window.console == "undefined")
          {
          window.console = {log:function(str){window.external.Notify(str);}};
          }
    
          // output any errors to console log, created above.
          window.onerror=function(e)
          {
          console.log("window.onerror ::" + JSON.stringify(e));
          };
    
          console.log("Installed console ! ");
        </script>
        
          <script type="text/javascript" charset="utf-8" src="phonegap-1.4.1.js"></script>
          <script type="text/javascript" charset="utf-8" src="jquery-1.7.1.min.js"></script>
          <script type="text/javascript" charset="utf-8" src="c2runtime.js"></script>
          
        <script type="text/javascript">
    
          function init()
          {
          document.addEventListener("deviceready",onDeviceReady,false);
          document.addEventListener("backbutton",onBackButton,false);
          }
    
          function onBackButton()
          {
          console.log("onBackButton");
          }
    
          function onDeviceReady(e)
          {
          console.log("deviceready event fired!");
          }
    
          PhoneGap.addConstructor(function()
          {
          console.log("PhoneGap.addConstructor is working");
          })
    
          // once the device ready event fires, you can safely do your thing! 
          function onDeviceReady()
          {
          console.log("IS READY");
          cr_sizeCanvas();
          cr.createRuntime("c2canvas");
          }
    
          function cr_sizeCanvas()
          {
          var canvas = document.getElementById("c2canvas");
    
          if (canvas)
          {
          canvas.width = 800;
          canvas.height = 480;
    
          if (canvas.c2runtime)
          canvas.c2runtime.setSize(800, 480);
          }
          else if (window.c2runtime)
          window.c2runtime.setSize(800, 480);
          }
    
          window.addEventListener('orientationchange', cr_sizeCanvas, false);
    
        </script>
      </head>
      <body onLoad="init();" id="stage">
        <h4>PhoneGap Tests  </h4>
        <div id="fb-root"></div>
        <canvas id="c2canvas" width="800" height="480" oncontextmenu="return false;" onselectstart="return false;"></canvas>
      </body>
    </html>
    

    something seems work BUT

    From here

    IE9 does not expose touch events, or even mouse events to JavaScript. The only UI event that is available to your code is the click event. This means that many interfaces that are based on scrolling libraries and a WebKit DOM will not function as expected. The browser control DOES appear to support the CSS value of overflow:scroll, however there is no momentum and the scrolling feels sticky. I have done some quick exploration into exposing mouse events to JavaScript via the container and they do look promising. I will be moving on to this after I completed the Events API so your code can override the back-button and search-button.

    IE9 supports localStorage, and sessionStorage, however they are not available to pages that are loaded without a domain. We will be investigating implementing this API ourselves, and managing the storage in IsolatedStorage.

    so... anyone who found a method for catch input? <img src="smileys/smiley19.gif" border="0" align="middle">

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Have you tried just using the Mouse object? It sounds like IE Mobile just fires mouse events for touches. You might be stuck with single touch input though, which would suck.

  • I can get it to sort of load myself with that template you posted. My issue right now is the scale. There seems to be a scaling issue where there is a good deal of space (about 40 pixels) on the bottom that pushes the canvas up and shrinks it.

    Also is the main issue with PhoneGap/WP7 the screen bounces if you touch and drag.

    Also I don't know how to get the manifest.xml to profile from the exported file, I seem to be manually editing those every time I use a phonegap template. I think I just need to make sure VS takes care of that.

  • firebelly - I've also seen the 40 pixel gap bug, and reported it to PhoneGap. I guess they still haven't fixed it.

    WP7 does not support multitouch for HTML5 games and the performance is not as good as other devices like iOS or even the Blackberry Playbook. Combined with the bug it's not currently a very good platform for HTML5, so I would focus on other devices for now. Hopefully Windows Phone 8 will do better.

  • I agree, but I have coded some proof of concepts with native PhoneGap 1.8 and they have performed well and looked fine (scale was good).

    You have to plan for single clicks of course, but I think the platform can handle the HTML5 content to some extent (simple games). I have doubts IE10 will help much other than performance and some HTML5 feature compatibility. I think the single touch is a little bit of a hold over from 7.0 and silverlight. Silverlight never really handled multitouch well. I don't see how they would include it now, but there is always hope!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)