Pode's Forum Posts

  • paulocoghi : illuminated.js shouldn't be used in production, since all lightning calculation are made on Canvas, too slow to be realtime when you have other things to calculate in parallel (like the whole gameplay, physics, or Sprites movements).

  • bjadams : it's not possible via javascript. However, Google is using the "x-webkit-speech attribute" tag, for its HTML5 Speech API.

    I didn't used it for the moment, but for what I know, it's WebKit sends the audio data as POST request to process it on their server.

  • david0vincent, Ashley : It's not the keyboard fault. It's just the way Safari on iOS handle keyboard events.

    From http://stackoverflow.com/a/4804590 :

    Safari for iOS doesn't trigger keyboard events on DOM elements that are not components of a form. This includes the document and body which are usually used to capture keystrokes anywhere on the page.

    The only way to trigger a keystroke event on document or body of a page is to trigger it in an input or textarea. In that case, the event will correctly 'bubble' to the body and document.

    However, this might be a problem because Safari for iOS doesn't allow us to give an element focus from javascript.

    At the moment, we are using a solution where user has to click on an input field before starting the first scan, and the input field is then moved off-screen but retains focus.

  • Laurent : Yes, of course ! You can make an archive, put it your 'public' dropbox folder, and PM the link.

  • Laurent : Ashley way of doing is cleaner <img src="smileys/smiley2.gif" border="0" align="middle" />.

    in htmlwidget.html, here's what I would do (I don't know what's already inside) :

    <html>

    <head>

    <style>

    iframe {

    frameborder: 0; <!-- no frame border -->

    scrolling: "no"; <!-- no scrolling inside the C2 iframe to avoid interaction problems -->

    height : "640px";<!-- adjust accordingly -->

    width :"480px";<!-- idem -->

    marginheight : 0px;

    marginxidth : 0px;

    padding: 0;

    }

    </style>

    </head>

    <body>

    <iframe src="index.html"></iframe>

    </body>

    </html>

    index.html being the one exported by C2.

    By looking at the tree structure of your screenshot, I would also move everything inside "C2Project" into "HyperProject_Ressource", while keeping the hierarchy of files and folders that was the one inside C2Project (to let the C2 script find back all its tiny bits).

  • nutmix : you can map your distant FTP as a local disk, in Windows.

  • Laurent : don't worry about the "offline" part. If you embedd your HTML page inside something like Phonegap, the tool is going to do what's needed to trick the browser into thinking he is "online".

    In your new HTML page (we suppose it's a page from a larger book or magazine), you can put that code, from the index.html exported by C2 :

    <div id="c2canvasdiv" style="margin: 0 auto; width: 1024px; height: 768px;">

    <canvas id="c2canvas" width="1024" height="768">

    </div>

    The "div" isn't strictly necessary, but it's there to keep things cleaner (for example, some plugin can use it). Obviously, in your exported project, the width and height values can be different.

    You also need to add that part at the bottom of the page, before "</body>" :

    <script src="jquery.min.js"></script>

    <script>window.jQuery || document.write("<script src='jquery-1.7.1.min.js'>\x3C/script>")</script>

    <script src="c2runtime.js"></script>

    Don't forget to put the "jquery.min.js" file at the root of your directory, next to your HTML page.

    You can also find sme code between

    <script>

              jQuery(window).resize(function() {

    [...]

    document.addEventListener("visibilitychange", onVisibilityChanged, false);

    document.addEventListener("mozvisibilitychange", onVisibilityChanged, false);

    document.addEventListener("webkitvisibilitychange", onVisibilityChanged, false);

    document.addEventListener("msvisibilitychange", onVisibilityChanged, false);

        </script>

    its not necessarily needed by a tool like Phonegap, so aren't forced to include it...

  • Resslx : since the stock browser in android doesn't allow access to NFC from Javascript, you need to create an app with Phonegap, which has a NFC plugin on Android.

  • Rory : you can also use it to exchange data between two smartphones that aren't paired, not on the same network (wifi or cellular), or not from the same manufacturer (iOS vs Android), but still physically close (in sight).

  • Rory : I know the technical details of the implementation of a QR Code, but the initial code of the project is from a japanese fellow, linked in the dev thread <img src="smileys/smiley2.gif" border="0" align="middle" />.

  • I added a new plugin in the dev section : QR Code Creator : http://www.scirra.com/forum/topic56438_post351843.html#351843

    The technical details are in the other thread, but that means that you can create a quick code to be displayed by your game or webapp.

    With that, user seeing the page on their desktop can snap a quick picture with their smartphone to load the page on their smartphone, without typing a long URL !

    As a demo, a code generated by the plugin to link to this page :

    <img src="https://dl.dropbox.com/u/1412774/QRCodeDemo2/demo2.png" border="0">

  • Here's a plugin which was waited for by somebody for a loong time : DataMatrix Creator (also known as QR Codes).

    <img src="https://dl.dropbox.com/u/1412774/QRCodeDemo2/demo.png" border="0">

    (Yeah, I know, QR Codes aren't very "sexy" to look at, but I didn't saw any other demo for it <img src="smileys/smiley2.gif" border="0" align="middle">).

    You can generate a QR Code, choose its Quality Type (meaning the redondancy in the code => its robustness to noise (like bad pictures taken from smartphones), and its Level (meaning its 'size' in QRCode world).

    By the way, the size of the drawn Code is decided by the size you set inside C2 IDE. That means you can generate a very "small" Code (with a Level or 2 or 3), but display it inside C2 with a size of 600x600 pixels ! It's going to look elongated.

    The demo : https://dl.dropbox.com/u/1412774/QRCodeDemo2/index.html

    The plugin : https://dl.dropbox.com/u/1412774/QRCodeDemo2/pode_QRCode.1.0.zip

    The .capx : https://dl.dropbox.com/u/1412774/QRCodeDemo2/QRCodeDemo2.capx

    Watch out for some combinations of string size and Level. If the string is too short, the lib will trigger an error because it can't be encoded at that Level.

    The code is base on the JS lib from there : http://d-project.googlecode.com/svn/trunk/misc/qrcode/js/qrcode.js

    With that plugin, you can generate some quick Code to send users directly to your game when snapping the code with their smartphone.

    Exemple : code for this page =

    <img src="https://dl.dropbox.com/u/1412774/QRCodeDemo2/qrpage.png" border="0">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • bon4ire : if I remember well there's no "toDataURL()" (necessary for the "take snapshot" action to occur.

    Ashley : did you worked around that on Android ? I know there's a polyfill for Android : http://code.google.com/p/todataurl-png-js/

    Did you already used it ?

  • bjadams : I'm happy that your son was proud of his project ! <img src="smileys/smiley1.gif" border="0" align="middle" />.

    All : updated first post with new build (v2), adding the "keep RGBA channel" function.

  • Laurent : I was planning to add that feature a moment ago, but that's when I saw your post that I found it more waited for that I was thinking.