[Plugin] spriteURL

0 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • This plugin loads an image inside a sprite at runtime (lazy loading).

    To use this, add the object to the layout, position it (currently I only support top-left hotspot), then add the action to load from url.

    If you need to lazy load an image outside construct2 this is the plugin you need (read the FAQ).

    This plugin works with every browser either mobile or desktop. If you find a bug/error please report it so I can update the plugin.

    Get the

    latest version (v0.5b)

    CHANGELOG:

    v0.5b (April, 18th 2012)

    -First public release

    ---------------------------------------------------------------FAQS

    Considering that we already have one behaviour and one plugin that does exactly the same thing as mine why should you use this one?

    Short answer: it's the only one that works.

    Technical answer:

    Loading an image at runtime it's an hack, basically something that c2 wasn't made to do, both the existing plugins do not treat it as such because they were tested only on new browsers. Both of those plugins DO NOT work on android and iOS (on 4.x they make c2 crash, on 5.x they are unpredictable) and have glitches when ran inside webGL.

    Why you may ask? With the help of Ashley in this thread and with days of testing I found out that on older (or slower) browsers, the image at one point as a value that could be less than zero, null/false and even unpredictable values, this means that when ctx.drawImage gets called all sort of error happens, errors that can result in a complete crash or glitches. My plugin checks if the image has been REALLY loaded and ONLY then it draws it, as far as my knowledge goes this can be done only in a plugin because you have complete control of the drawing part.

  • Good to know this is of zero interest. <img src="smileys/smiley11.gif" border="0" align="middle" />

  • Actually, this is the first time seeing it.

    So... nice job.<img src="smileys/smiley1.gif" border="0" align="middle" />

    Might be nice with some options for frames. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • Good to know this is of zero interest. <img src="smileys/smiley11.gif" border="0" align="middle" />

    Hell noo...

    I didn't notice this thread, but you bumped this that it makes me interesing.

    Then, awesome plug in! I wonder if Scirra is working a module loading per layout for complex games which contain more than 50 mb

  • Indeed I had missed this thread too.

    Sounds nice enough. And added to the general list of custom plugins and behaviors.

    Good job.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For some reason, I don't see "load from URL" in the actions for a sprite (I put it in the "plugin" folder)

    ]

  • Really nice plugin, nice work!

    But the plugin doesn't work when WebGL is activated.

    I get a "inst.drawGL is not a function" error message.

  • CodeMasterMike

    To be honest I haven't tested it in WebGL, hang on, I'm in the process of using it for a Chrome Web Store App and I'll need WebGL. As soon as I fix it I'll let you guys know.

  • No stress, I just thought I would mention it to you, seeing its still a work in progress <img src="smileys/smiley1.gif" border="0" align="middle" />

    Im interested in to know what your goal is with this plugin?

    As it is now, you cant do much with it.

    What I would like to see, is that it would work just like a sprite, with all sprite functions. And added that you can choose to load a URL sprite into a animation frame.

    Keep up the good work!

  • CodeMasterMike my goal is to succesfully do what you stated, the problem is that injectng another image in a sprite is an hack and as a mobile developer my current goal is to assure 100% compatibility across all browsers (mobile and desktop), which means taking baby steps until all quirks are worked out. If you are developing only for desktop there is this excellent Plugin.

  • If you add general sprite events like appearance, size & position, z order, etc, I would be very interested in this plugin. Without these it's not much useful for my purposes.

  • Wake up men !

    "Spriteurl" is a amazing plugin working everywhere (test done) but actually without using webgl.

    Instances of spriteurl is supported but i have notice a little bug when i put several side-by-side spriteurl ... some browsers (firefox/safari/opera) put a 1px line between sprites either every times or sometimes when using a scroll-to method ;-( ... hope his author will create a "Tiledbgurl" plugin too to avoid using instances and correct this little problem. A support of the most used attributes such as "Opacity/Effect/Hotspot-center" will be appreciate too.

    I follow this plugin dev. with great interest and can't believe some find it useless, if you have to load some bitmaps at runtime (user choice) or simply only replace scenes by others (adventure games) ... this is THE plugin you need.

    Enjoy !

  • Hi all, just a heads up: the next build will have 'Load image from URL' integrated in to both Sprite and Tiled Background with support for WebGL as well. Hopefully this will satisfy all needs for loading images dynamically.

  • That's great news Ashley! With official support to load images at runtime combined with the new import external files feature I'm seeing lots of great possibilities.

  • Ashley wonderful news! Thanks

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