Yann's Recent Forum Activity

  • Ah! my bad (: I didn't update 'cause in 187 there's a potential breaking change and well... I don't have time to deal with it at work =), anyway that's neat, thanks.

  • Problem Description

    When you minimize the C2-ejecta application and go back to it, you get a javascript error about a null context

    This change fixed it:

    in the Audio plugin:

    +++ ...\exporters\html5\plugins\audio\runtime.js
    @@ -2726,7 +2726,7 @@
                 return;
             
             // upon resume: first resume the whole context
    [ul]
    	[li]if (!s && context["resume"])[/li]
    [/ul]+        if (!s && context && context["resume"])
                 context["resume"]();
             
             var i, len;
    @@ -2734,7 +2734,7 @@
                 audioInstances[i].setSuspended(s);
             
             // after suspend: also suspend the whole context
    [ul]
    	[li]if (s && context["suspend"])[/li]
    [/ul]+        if (s && context && context["suspend"])
                 context["suspend"]();
         };[/code:lm22brj0]
    
    For some unknown reasons, context might probably be null during a few frames and then the audio kicks in back.
        
    [b]Operating System and Service Pack[/b]
    iOS 
        
    [b]Construct 2 Version ID[/b]
    r186.2
  • Ashley, oh sweet thanks (:

  • Ashley ,

    Once again, this bug bit me today. So I thought of an alternative temporary solution: an option to deactivate spritesheeting on specific frame/animations/object/project. This way there's no need to manually post process the exported image each time (with the risk to forget). For now I can do that by setting the export format to JPG. But sometimes I still want transparency so it only works in some cases.

    Yet again, I think you should pad pixels when you spritesheet (which only happen on export right? not sure why you mentionned spritesheeting for preview). I don't see any problem with doing that, because you already have a margin between images, you only need to add a little processing to repeat the bordering pixels on each side of the image.

  • delgado

    now it's corrected puzzleDelgado.capx

    it wasn't an issue with C2 versions, just that the code was very wrong in a few places. (also I added a few simplifications)

  • Ashley

    You don't need to add padding at preview time, since you are not spritesheeting. The texture is probably using gl.CLAMP_TO_EDGE which has the same effect as padding pixels.

    The problem only arise when the image being sample is inside a spritesheet, which only happen on export (right?).

    If somehow you could change the spritesheeting algorithm to add 1pixel padding around the images on export, the problem would be solved.

    For now, I have to remember doing that myself on photoshop each time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem Description

    I've notice a discrepancy between preview and export when rendering stretched sprites.

    This happens when your frame get "spritesheeted". And probably only when using webGL.

    This probably happends because when weGL renders the border of an image, it linearily interpolates with the neighboring pixel.

    To avoid this problem, in 3D games, we usually pad the pixels of a texture (repeat first/last rows/columns)

    Attach a Capx

    pixelPaddingOnExport.capx

    Description of Capx

    You should compare preview on export (I added a dummy frame on the sprite to force spritesheeting)

    Steps to Reproduce Bug

    • Preview -> notice that nothing is wrong, the 3 sprites are seamless
    • Export -> notice that there's a blurry seam on the sprites' sides (like in the editor)

    Observed Result

    Discrepancy between preview and export

    Expected Result

    Should behave like preview (no blurry edges)

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: WHO CARES?

    Operating System and Service Pack

    Win 7 Ultimate

    Construct 2 Version ID

    r178 (and probably higher since I haven't see any mention of a fix in the changelogs)

  • Inc

    Nobody prevents you from posting your capx here (unless there's some forum limitation I'm not aware of)

    I'm not the only one who can help (:

  • Inc

    I just opened the original capx and played it, everything looks fine. Did you change anything? What you are describing would mean that xTarget and yTarget are equal to 0

  • Nope, the array object is just using indices and you can only have 3 dimension

    something like Array.At(3,5,1) you can't have strings as "index"

  • justifun

    Of course it's undefined

    If it were in javascript you would probably do something like

    myJSONData["data"][0][0][0]["Username"]

    So in the plugin it would translate as

    JSON.Value(0,"data",0,0,0,"Username")

    Ya need to tell the thing where to put the data from.

  • amitcv86

    You probably meant that the dropbox link wasn't working anymore.

    Now it should.

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann