Pode's Forum Posts

  • You still need to give credits to where it's due :)

    Flash is fast, has lots of effects, and can access hardware devices without breaking the security models. And furthermore, they got audio right ! (For the moment, no browser vendor knows how to do that...)

    Furthermore, as I discussed with lucid on IRC, I really Flash (from the 8 or 9 build) as a vector editor (even with no animation). Inkscape is of no use on Mac, and for the others, the tools/shortcuts/workflow is counter-intuitive...

  • From the comments of the video : he used a clever trick, nothing "HTML" specific. As Kiyoshi said, you need 2 canvases. The slow part with Canvas is drawImage(). So you need to move the viewport, know how much you moved by using two variables, and only draw new tiles in the white row or columns that has just been created. So the number of redraw is only linear, not exponential.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 0plus1 : I completely agree with you on the fact "use the tool that fits the job". I use C2 and produce HTML5 games and app for client, in controlled environment, where I know what I do works. For the moment, it's doing what I want it to do, cheaper and faster (for my client) than other solutions, so for me, it's a win <img src="smileys/smiley1.gif" border="0" align="middle" />.

    Anyway, I also do code in OpenCV and C/C++, and for the moment, nothing can beat that in pure speed...

  • 0plus1 : I'm not claiming anything spectacular. If your javascript engine is using a JIT, then for code properly coded, you can have the same perfs as a native binary, because a jit'ted code page in memory is *directly* executable.

    That's why, in various benchmarks, you can have Java code beating C/C++ code, or Python faster than C, for example. A codetree that has just been evaluated by a JIT can be more efficient than compiled-ahead code, with the compiler having no information of the context.

    That's also why, on iOS, webapps can't use the various acceleration in Nitro. JITting means that you are flagging some memory page as "executable". That could be a potential security flaw for Apple (not if they properly designed their browser, but they are �ber strict about that kind of things...)

  • 0plus1 : a shader is executed by the graphic card, so it's hardware accelerated.

    And, by the way, interpreted can be faster than native, because the JIT has access to what the compiler don't : the execution context <img src="smileys/smiley2.gif" border="0" align="middle" />.

  • rexrainbow : ah yes ! It's because the template is copy/paste from another one I made. I'm going to change that in next release. Thanks !

    Edit : I'm asking myself a question, because I'm not in front of C2. If you use an "object" plugin, are you allowed to have several of them, distinct from each other ? In fact, if you want to save several files, you need to have a "FileSaver" plugin for each file, to be sure that their content isn't mixed.

  • 0plus1: distortion meshes and things like that can, in fact, be implemented with WebGL, because in the end it's a calculation over a shader.

  • smitchell : no, because the WebKit build of Safari on iOS disable lots of things. But if you use PhoneGap, you can bypass that problem...

  • Update : v1.1 <font color="red">22/10/2012</font> : possibility to save images.

    You can now save Image on disk ! You provide a base64 string of the image, and you can save it ondisk.

    As an example, I'm taking a snapshot from the webcam, and saving the image :

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

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

    The plugin : https://dl.dropbox.com/u/1412774/SaveImageDemo/pode_filesaver.1.1.zip

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

    ___________________________________________________

    Something long waited for : the possibility to save files on local filesystem !

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

    I used the FileSaver.js shim to make the plugin works crossplatform (https://github.com/eligrey/FileSaver.js). It should works with relatively new browser, but not necessarily cutting edge.

    For the browsers that don't implement yet the FileSystem HTML5 API, the plugin at least open a new window with the right url set (base64, xml, and so on) to let you do a "right-click | Save as"...

    For the moment, you can save text file and HTML strings as html files.

    The demo : http://dl.dropbox.com/u/1412774/FileSaveDemo/FileSaverDemo.capx.

    The plugin : http://dl.dropbox.com/u/1412774/FileSaveDemo/pode_filesaver.0.1.zip

    Planned for next version : save images and save binary blobs...

    Edit : cleaned a bit my botched english...

  • rexrainbow : melonJS is MIT licensed, which is not very restrictive (one of the thing you can't do is restrict the rights of people using what's under the license, so you can go ! <img src="smileys/smiley2.gif" border="0" align="middle" />

  • edisone : wouhou, at least one answer !

    I'm planning to add that possibility at edittime too...

  • A quick information for plugin makers (since I have other plugins in the cooking) : for those who want to add a TMX plugin, you can use code from MelonJS (https://github.com/obiot/melonJS/tree/master/src/level)

  • Thanks to chrisbrobs for the tutorial on the plugin ! When I'm done with the FileSaver plugin, I'm going to be back at the HTML pack, to add more functionalities...

  • After a discussion with Kyatric on IRC, here's a new plugin : UITemplates.

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

    Do you miss the various "Layout" objects from Java/SWING, allowing you to have a "bag" in which you throw some widgets, and the "Layout" object arranges everything onscreen for you (you can have GridLayout, a FlowLayout, and a lot of other elastic Layouts).

    This plugin is there to do the same. I renamed the whole thing "Templates", to avoid confusions with C2's layouts.

    For the beginning, there's only GridTemplate. You can specify a number of rows/columns, the inner padding in pixels from the border, and at widgets.

    Currently, it only works with objects added at runtime (I still need to understand how to add objects create at editime without breaking everythin). It doesn't work also with HTML objects (Button, TextBox, HTML_Div, etc..), because those are using CSS to style themselves.

    The demo : http://dl.dropbox.com/u/1412774/UITemplate/index.html

    The plugin : http://dl.dropbox.com/u/1412774/UITemplate/pode_UITemplates.0.1.zip

    As always, Critics&Comments are welcomed !

    Edit : I forgot to say it, but : thanks a lot to (French)Yann for is ]sliders example code ! <img src="smileys/smiley2.gif" border="0" align="middle">

  • DalekAddison : you just provide the URL of the image.