Pode's Recent Forum Activity

  • 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">

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Laurent : you need to check the demo ! <img src="smileys/smiley2.gif" border="0" align="middle" />.

    You need two Sprites. One of them to which you add the behavior. After that, you can go in the "events" sheet, and add an action on the Sprite on which you added the behavior, which consist in one of the "blending action".

  • Laurent : those are the supported modes : src-over, screen, multiply, difference, exclusion, src-in, add, lighten, darken, overlay, hardlight, colordodge, colorburn.

  • shiprat odesign : do you known in advance what kind of gesture you want the user to do ? If it's a shake, do you know how much shake you want to have, and on which axis ?

Pode's avatar

Pode

Member since 3 Sep, 2011

Twitter
Pode has 11 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies