Pode's Forum Posts

  • : on iOS, the playing of an audio file, fom an HTML5 app, doesn't work like that. You need to preload the file when the user click on something, and then play it.

  • : it's not going to work like that. You check in the direction of the psot I made about Audiosprite for iOS platforms...

    One of the problem is that you can't load/preload a song without user interaction, and you can't play a sound without loading it first. On top of that, you can't play simultaneously two sounds...

  • septeven: something I was doing with the webfont plugin is something like that :

    var linkTag = "<link rel='stylesheet' type='text/css' href='"+nameOfCSSFile+"' />";

              jQuery('head').append(linkTag);

    I suppose you can append to the body via jQuery('body')...

  • : somebody can code a quick plugin using a DOM property from IE that has been implemented on other browser : offsetWidth.

    The way to use it is :

    var offsetWidth = element.offsetWidth;

    So if you have your text inside a <span>, for example, that has no border nor any frills, you can retrieve the width in pixels of your string as displayed on screen. I don't know if Ashley has the time to implement that C2's Text object, but perhaps another plugin developer can attack that problem.

    If nobody has done that yet in a week or two, I can make it myself, but not before ;).

  • Chiptunes can be possible in some future, when the HTML5 Audio API is normalized everywhere. For the moment, you need an array to store the values you generate, and convert that to audio via base64. And since that only works to create WAVE/RIFF via javascript, you can imagine that the array that needs to be filled is huge. And most browsers choke on that for the moment...

  • It's the same, since at each tick the system needs to traverse the object tree to check which we is inside which one...

  • Jarlax: one quick solution : create a Sprite whith only a circle in it (the color you want, it's not going to be displayed), and a transparent background appart from that color. Pin that centered on your player.

    You can add a condition to check when that circle overlap the plyaer.

    At the beginning of your level, don't forget to put the opacity of your circle at 0 (so it's still there for collision detection, but not displayed on screen).

  • jessejoh: I finally made it, about the rotation of your elements. Since I didn't saw you on IRC, I'm sending it to you by mail.

    You can add that to all of your HTML elements ;).

    I also tested : when you put a "visibility:hidden" for C2's <canvas>, your HTML items are still visible ;).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the tl;dr sum up everything : that guy doesn't like it...

  • Great ! Very useful what, you manage to assemble ! ;)

  • If remember well, jQuery's AJAX calls are asynchronous, so you are never sure when they return. Perhaps a plugin with synchronous AJAX calls is needed (but the bad thing is that's going to stall everything...)

  • delgado: the problem with threes.js is that it creates a whole new context to use 3D stuff inside. And that isn't going to be accessible from Construct2 IDE. So you can develop a plugin to integrate three.js inside C2, but you are going to load javascript text file for it to make it useful, and everything related to it is going to be coded with the notepad, not C2.

  • Something I saw : when you play a mp3 with the ipod widget in background, you can play sound SFX on top of that when using an audio sprite. So, for the when, if you want background music, you need to provide audio on a different link, let the player add it to his library, start it, and play the game...

    There's also a plugin for Phonegap that allows to use native calls to load and play audio (transparently). I need to find back the URL for that plugin...

  • Yann: can you use the .toDataURL() to do what you want with layers ?

    With that function, you can retrieve what's on C2's canvas, get it inside a png, and paste the png inside R0j0's canvas...

  • The problem with node.js, is that you need to run it as a server. Since webbrowsers are considered as client only (for security reasons), you need to find a way to provide an executable version of the nodejs binary to your user.

    On FF, you can use something like POW (an extension plugging a webserver inside FF), on Opera, there's Unite, which has his own limitations, but I don't think there are something available natively for the other browsers...