bounty's Forum Posts

  • 15 posts
  • Hey Ashley,

    I've tested this on new directories and with different projects. I'm running v266.

    The error message is as follows:

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    An image file was not successfully exported

    Condition: FileExists(job.dest_file.c_str())

    File: html5.cpp

    Line: 3836

    Function: void __cdecl DoImageProcessingJob(const struct ImageProcessingJob &)

    Build: release 266 (64-bit) checked

    Component: HTML5 exporter

    (Last Win32 error: 3)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort Retry Ignore

    ---------------------------

    I get the error twice and then Construct 2 completely crashes.

  • Hey dop2000,

    That's a nice idea to map the string names to specific events. But it would be a pain for a large scale project. My hope was to enable to use this level editor for my entire game's development and all level designs.

    Regarding the Minify Script tickbox. I think the issue is that minifying the script will happen after this optimisation step anyway and therefore the source map that is generated will simply give info I already have.

    Ultimately, I think I will keep my plugin the way it is for the preview process but I will also implement another form of translation of my external level editor's content which will be a non-runtime process. e.g. I will write a script to translate my existing level editor content into Construct's own XML format for layout data. This way I have a "correct" way of translating my level data to Construct's and I still have a quick preview system while developing.

    Assuming Ashley's reading this thread, my request for Construct itself would be:

    a) Make the export process more configurable. It would be great to have things like "per project configurable export paths" and more options for the level of optimisation (like in this thread, an option to keep a mapping object for object type names and property names would be great).

    b) Make the Construct 2 level editor "watch" for changes to XML project files. So if I write a script which creates new layout files in a project directory, I shouldn't have to re-open the entire project to view or even preview my work.

  • Hi dop2000, yeah that's a basic example of what I'm trying to achieve.

    To be more specific, I'm using a totally separate level editor which produces a data format.

    And I have written a plugin for C2 that can read that format and instantiate the appropriate objects.

    To keep things simple for referring to my classes between the two formats, I just mapped them using the name of the class/instance, similarly the property names are mapped by their name.

    So I need an index of these names in C2 after export of the project ideally.

  • Hi everyone,

    I have been working on a plugin that requires access to two things of a given object type:

    • its name
    • its properties' names

    I got the plugin working well with the project preview and then discovered after exporting that an exported project actually strips a lot of useful information away during the export process, including the above information.

    For example, when exported, the names of types will be rewritten to "t0", "t1", "t2" and the instance_var_names variable of a type will be undefined. Only the raw values of variables will be preserved but not their names.

    From what I can tell, Construct does this as an optimisation, which I totally get. But ultimately, I feel like it'd be really useful to have some way to look up this information for a plugin. I've got another tool I'm using to build my level data and I've written this plugin to read my level data and create the objects as necessary but this is preventing me from mapping my other tool's format to the Construct format.

    Any thoughts? Is there a way to get this stripped data? Is there a better way to enable using an external tool as a level editor?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another update actually... I just tested changing:

    uniform mediump float seconds;
    [/code:3ur61nu7]
    to:
    
    [code:3ur61nu7]uniform highp float seconds;
    [/code:3ur61nu7]
    And it appears to resolve the problem. I recommend moving over to highp for all your effects which use 'seconds'.
  • [quote:1o0x9f9k]

    Can't reproduce on a Nexus 7 or Nexus 9, both running Android 5. I think it depends on the precision of the hardware. What actual device models have you tested on?

    I can confirm this bug still exists and affects iPhone 6s and iPod Touch 5th Generation hardware.

    It appears to be the precision of the 'seconds' variable in effects which use this variable that degrades.

    If it helps, I timed the degradation. It becomes very visible within roughly 1 minutes and 20 seconds. Restarting or changing layouts doesn't help. It appears to be a time connected to the entire app's lifetime.

    Considering this time variable 'seconds' is used in an effect which we can presume is likely going to be "looping", couldn't we reset the variable within a particular loop period to reset the precision?

  • Firstly, just wanted to say Construct 3 is so far very impressive. It's great to see everything you've been able to achieve in a browser.

    I feel there are a few UI issues though I'd like to report below. Not sure they are bugs per se. So I've just posted them here.

    Copy shortcut

    On a Mac, when I do Copy via Command+C I get a weird popup saying:

    "The browser blocked the attempt to copy data. Click the 'Copy' button below to try again."

    Copy and paste is really a fundamental user interaction. Is this a bug? Or is there a way I can fix my browser to avoid this issue long term?

    Tab switching shortcut

    Personally I tend to change tabs constantly while working. Flipping between layouts and event sheets etc.

    I can't find a keyboard shortcut that switches tabs. Is there such a shortcut? I realise it's tricky since Control+Tab is going to be captured by the browser. Maybe Shift+Tab could be the Construct workaround?

    Reassigning shortcuts

    I think in general it'd be great if we could reassign shortcuts. On a Mac, F5 isn't a great shortcut to run a project (especially since the introduction of the Touch Bar). So if we could define our own shortcuts that'd be great.

  • The title basically says it all, but to provide more detail...

    I'm at the stage where I'm integrating IAP's and I'm aware of the Construct 2 plugin for IAP. But I was surprised to discover there didn't seem to be built-in support for IAP or a clearly recommended Cordova plugin for IAP on the Cordova site.

    My questions:

    1 - Does anyone have first-hand experience with this?

    2 - Which plugin do people feel is reputable?

    3 - Does the C2 plugin map perfectly in its implementation to some kind of IAP standard on the Cordova side?

    I feel like it's really important to "get this part right" and be assured in the security of this plugin. Especially since when you test these plugins you often need to enter your iTunes password (I realise I could create a test account; and I also realise that I can inspect the code of Cordova plugins on the native side).

    Thanks in advance!

  • Hey all,

    I'm wondering if anyone has an idea on how to do the following:

    A bit more detailed way of asking the question...

    "How do I change the context of the event sheet to refer to a particular instance of an object type for actions that take place subsequently from a previous action?"

    For example, there's an action that Spawns an object via the System actions. Once this action is called an object is created, subsequent actions related to that newly spawn's object's type will only relate to the context of the recently spawned object.

    How do I do the same in a plugin action I am writing?

    Thanks in advance!

  • I can reproduce on an iPad Air 2 running iOS 9.3, but I think the signs are pointing to a mobile Safari or graphics driver bug.

    Interesting. I have 3 devices running iOS 9.3 and they all have the issue (iPhone 6s, iPod 6th gen, iPod 5th gen). So it might specific to iOS 9.3.

    I also cannot reproduce on Chrome, Firefox, Edge (on Windows 10) or Chrome for Android, or Safari 9 on a Macbook. This suggests the Construct 2 code is correct (since it works across a broad array of browser engines, OSs and graphics hardware) and that it's possibly not a Safari bug (since it works on OS X). It could possibly be a Safari bug that manifests in the mobile variant only, or a graphics driver bug (I think iOS devices same the share similar graphics hardware/drivers, and while iOS is generally good on driver quality, our past experience is all drivers have buggy behavior at some point).

    I agree it is an iOS quirk. I don't know if it's software or hardware. My hope is that it's something simple which can be coded around or accounted for in the writing of effects which deal with transparency.

    Your simpler example uses a third-party effect, which we cannot accept in bug reports. (There's a built-in replace color effect anyway?) I think your theory about transparency turning black is probably correct, but to investigate further can you provide the simpler demo with no third-party addons?

    That was really silly of me. I setup the simpler example with the built-in replace colour effect which suffers from this problem but I started working on trying to find a workaround and I was saving the file into Dropbox as I worked.

    I have found a workaround but it required gutting some of the functionality of the built-in effect.

    Here is a clean version of the simpler example -- i.e. using just the built-in replace colour effect:

    dropbox.com/s/a5toytyweaajg7m/iOSWebGLIssueSimpler_clean.capx

    Here is the copy of my simpler colour effect that does the job:

    /////////////////////////////////////////////////////////
    // Replace color effect
    varying mediump vec2 vTex;
    uniform lowp sampler2D samplerFront;
    //uniform mediump sampler2D samplerFront;
    uniform mediump float rsource;
    uniform mediump float gsource;
    uniform mediump float bsource;
    uniform mediump float rdest;
    uniform mediump float gdest;
    uniform mediump float bdest;
    uniform lowp float tolerance;
    
    void main(void)
    {
    	mediump vec4 front = texture2D(samplerFront, vTex);
    	mediump float alpha = front.a;
    
    	if (front.a == 0.0)
    	{
    		gl_FragColor = front;
    		return;
    	}
    	
    	front.rgb /= front.a;
    
    	// Calculate distance from source color
    	lowp float diff = length(front.rgb - vec3(rsource, gsource, bsource) / 255.0);
    	
    	front.rgb = mix(front.rgb, vec3(rdest, gdest, bdest) / 255.0, 1.0);
    	
    	front.rgb *= front.a;
    
    	gl_FragColor = front;
    }
    [/code:392empeu]
    
    The functionality I ended up droping was the concept of a matching threshold -- so this now replaces all colour in a sprite -- although I don't believe it was actually necessary. I think the issue was related to values of zero alpha being used in the rest of the equation, therefore I identified that if I just returned out of the code as soon as I detected an alpha of zero it actually resolved the problem.
  • I've explored this bug further.

    I believe I've identified the bug is actually related to how alpha is handled by effects such as "replace color". It's not caused by the "blur effects" as I originally believed -- rather the blur effects mask/hide the bug caused by the "replace color" effects when used in tandem.

    I've created a new CAPX that is even simpler for testing and demonstrating the bug:

    dropbox.com/s/o9gqklsf7646jsl/iOSWebGLIssueSimpler.capx

    The bug occurs whenever there is a texture with transparency which is being affected by the "replace color" effect on a mobile device.

    The transparent pixels of the texture will turn black.

    The diamond texture demonstrates that the presence of a "horizontal blur" effect sitting underneath the "replace color" effect actually negates the bug.

    Not touching the screen:

    Touching the screen:

    I'm hoping this is just a bug in the design of the effects system or the effects themselves and not an issue with WebGL on iOS.

    Note: This bug appears in both Mobile Safari and on an iOS app via Cordova.

  • Please read my reply post after this initial thread post. I have created a simpler test file for exploring the issue and narrowed the bug down further.

    Problem Description

    The blur horizontal and blur vertical WebGL effects have issues with alpha channels in specific situations when appearing on a layer with transparency and only on iOS (via Safari browser or native):

    • Example situation 1: There are no issues while the blur effects are enabled. However, when the blur effects are disabled then a problem occurs. Specifically the transparent areas of the layer become completely black.
    • Example situation 2: Even while the blur effects are enabled, the same type of problem can occur if and only if an additional effect is placed above the ordering of the blur effects (on the same layer). Specifically I have tested with the Brightness layer to cause this issue.

    Attach a Capx

    dropbox.com/s/2jbgwzjxqx68op3/iOSWebGLIssue.capx

    Description of Capx

    This file provides 4 testing layouts:

    • Layout "test1": Specifically tests situation #1 from above by using an "actors" layer with the blur effects. Note that the Brightness effect is also on this layer but doesn't create any issues. While in Layout "test2" the order of the effect sorting with respect to the Brightness effect is instantly causing the discussed problem.
    • Layout "test2": Specifically tests situation #2 from above by keeping the layers and objects the same as Layout "test1" and only altering the situation by the order of the effect sorting with respect to the Brightness effect.
    • Layout "test3": Further tests situation #2 from above by removing all objects except a single sprite.
    • Layout "testX": Please ignore this. This layout was used for debugging.

    Steps to Reproduce Bug

    • Run the various layouts on an iOS device in Safari.
    • Compare the graphics with a PC or Mac (even a Mac running Safari! Which suggests the issue is only for mobile Safari).
    • For "test1" touch the screen to cause the problem. For "test2" and "test3" just load the layout to see the same problem.

    Observed Result

    The transparent areas of the "actors" layer with the blur effects seem to be distorted when this problem occurs. The distortion appears to be that the transparent areas become solid black.

    This image demonstrates layout "test1" running fine:

    This image demonstrates layout "test2" triggering the bug:

    Expected Result

    I expect the iOS experience to match the desktop experience -- i.e. the transparency of the layers shouldn't be distorted.

    I'm especially surprised that iOS Safari doesn't match Mac Safari in this case.

    Affected Browsers

    • Chrome: (NO)
    • Mac Safari: (NO)
    • iOS Safari: (YES)

    Operating System and Service Pack

    iOS 9.3

    Construct 2 Version ID

    Beta release r229

  • Hi Ashley,

    I actually do have cordova-plugin-file installed as well sorry. I was only listing the plugins I thought were necessary.

    In reality I have a few plugins installed:

    • cordova-admob-sdklibs
    • cordova-libgoogleadmobads
    • cordova-plugin-ad-adcolony
    • cordova-plugin-ad-unityads
    • cordova-plugin-ad-unityads-sdk
    • cordova-plugin-admob-simple
    • cordova-plugin-compat
    • cordova-plugin-file
    • cordova-plugin-game-center
    • cordova-plugin-httpd
    • cordova-plugin-inappbrowser
    • cordova-plugin-inapppurchase
    • cordova-plugin-media
    • cordova-plugin-nativeaudio
    • cordova-plugin-whitelist
    • cordova-plugin-wkwebview-engine
    • cordova-plugin-x-socialsharing

    In my cordova config.xml I have these tags:

    <plugin name="cordova-plugin-whitelist" spec="1" />

    <plugin name="cordova-plugin-game-center" spec="1" />

    <plugin name="cordova-plugin-inapppurchase" spec="1" />

    Most of the time I don't seem to need to add plugins to this config file otherwise.

    To build I just do:

    cordova build

    And then I open via Xcode and compile etc.

    I've tested my setup with the exact same .capx and done exports with wkwebview enabled and disabled. When it's enabled I get the AJAX failure, when it's disabled the AJAX works fine.

  • Problem Description

    The AJAX Plugin seems to be broken when exporting to Cordova with WKWebView. I tried downloading a local resource -- an XML file -- to parse.

    On desktop and when exporting to Cordova with WKWebView disabled this works fine.

    When I enable WKWebView and use the following cordova plugins:

    • cordova-plugin-wkwebview-engine
    • cordova-plugin-httpd

    This fails when I test on iOS. It triggers the AJAX error trigger but I don't know what the error is.

    Attach a Capx

    https://www.dropbox.com/s/f1wajoyprb9kq ... .capx?dl=1

    Description of Capx

    Attempts to download a local resource (an XML) via the AJAX plugin and then parse the output via the XML plugin.

    Steps to Reproduce Bug

    • Open the project.
    • Export to Cordova. Be sure to tick 'Use WKWebView'
    • Build and run the app for iOS.
    • Note that the XML fails to parse and instead the AJAX error trigger is triggered.

    Observed Result

    The AJAX fails to load and instead the AJAX error trigger is triggered.

    Expected Result

    The AJAX call should succeed and the XML data should be parsed by the XML plugin.

    Affected Browsers

    • Chrome: (NO)
    • iOS Cordova (YES)

    Operating System and Service Pack

    iOS 9.3

    Construct 2 Version ID

    Release 228

  • 15 posts