Johncw87's Recent Forum Activity

  • Check your drivers......................................

    I am able to replicate this issue on both an AMD card and an Nvidia card, with drivers from this year. It's highly unlikely that this is a driver bug.

    I've created a new bug topic for this. If you want to share your experiences in it, please include your video card model and driver date, and make sure you try it in the 64-bit version (not the 32-bit version)

  • Try Construct 3

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

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

    When the following conditions are true, the problem will occur:

    1. Have a 9-patch in your layout.

    2. On the same layer as the 9-patch, have an object (a Sprite, for example) with a certain type of effect (Tint is known to cause it) render after the 9-patch.

    3. Have enough textures loaded into the Construct 2 editor. The exact amount required is unknown and may vary between machines. The loaded textures don't have to be from the same project. If in doubt, load a few very large projects. I use a project with 257 objects in a layout with unique images for each, with an estimated video memory usage of 63.3 MB

    The 9-patch will still be visible, but the object with the Tint effect and everything that renders after it will render incorrectly, usually resulting in seeing nothing at all.

    Attach a Capx

    I created a minimalist file, however, by itself, it does not have enough textures to cause the issue.

    https://drive.google.com/open?id=0B40Xy ... VhKSVpiQ0E

    Alternate file created by wertandrew

    https://1drv.ms/u/s!AkG5n8_vobVPg4sGtkt5LLjeitvUOA

    Description of Capx

    My capx simply has the minimum objects to cause the error, though not enough textures.

    wertandrew's can meet the requirements by itself (on my machine), but if you can't reproduce, try loading more textures.

    Steps to Reproduce Bug

    • Install Construct 2 64-bit. It must be 64-bit, as the problem doesn't happen on 32-bit.
    • Open example capx.
    • Make sure the project setting 'Preview Effects' is enabled.
    • Load a large project or two for good measure, in the same Construct 2 instance.
    • View the layout from the example capx.
    • Scroll around a bit. Sometimes it will appear normal when you first load it, and start screwing up if you scroll the window or zoom.

    Observed Result

    In my example capx, the grey box Sprite that is tinted red disappears, as well as the Sans Sprite. The 9-patch remains visible exactly where it should be.

    Expected Result

    I expect the objects to render where they are supposed to be.

    Affected Browsers

    None, this is an editor only bug.

    Operating System and Service Pack

    Windows 10 64-bit

    Windows 7 64-bit

    Construct 2 Version ID

    Release 240 (64-bit) has this problem.

    Release 240 (32-bit) does not have this problem.

    Most of the time this bug has the effect of making it seem like objects disappeared, but I've seen a case where objects were in the wrong place and following the screen scroll (I can provide a video if needed, but not a capx), and I've seen a case where the objects somehow got a 3d rotation applied to them. This leads me to believe that it is related to an OpenGL vertex transformation matrix.

    Yes, this is a duplicate to the bug you closed here:

    9-patches-create-errors-in-editor-view_t183574

    However, I am completely unconvinced that this is a driver issue. I tested this on the following configurations:

    Windows 10 64-bit

    AMD Radeon HD 5700 Series

    Driver date: 2016-02-26

    Windows 7 64-bit

    Nvidia GeForce GT 640M

    Driver date: 2016-07-10

    On both systems, the problem occurs on 64-bit Construct 2, and not 32-bit Construct 2. Same exact bug, two completely different card vendors (and drivers). I've observed this bug for at least a couple of years, through many Construct 2 versions, so this isn't a regression. It has always been there since I started using it. I find it incredibly unlikely that both drivers from both vendors have the same exact bug, and it somehow only affects the Construct 2 editor and absolutely nothing else. Keep in mind I have a large steam library, and I've played most of the games in it without any sort of issue like this.

  • I'm certain there's a bug in the editor that is related to rendering, however I'm not entirely sure of the cause. When it does happen, there's usually a lot of different objects on the screen, and while they sometimes 'disappear' completely, other times they appear in the wrong place as if they had the wrong vertex transform (sometimes even with 3D rotations!). Like the others, if I disable effect previewing, it stops happening. Whatever the cause, I'm fairly certain that a vertex transform is involved.

    Maybe you could make a special editor build that rebuilds the vertex transform matrix from scratch before rendering each object, and we can see if the bug stops? This is obviously impractical as a permanent solution for performance reasons, but for diagnosing the issue, it could be useful.

    Edit: if I move all objects with effects to their own layer, the problem stops completely. It seems objects with effects don't like rendering after 9-patches, but keeping them on separate layers makes it a non-issue. But, if this happens, EVERYTHING after them disappears (or moves to someplace odd), even on separate layers.

    Edit: Objects with tint effects have this bad interaction with 9-patches, but objects with brightness or swirl effects do not appear to.

    Edit: I created this capx to show the minimum requirements for the bug. I think I've also identified the last requirement. If you just open this file, you might not notice anything odd. But, if you were to add a ton of objects, then the problem will start. Alternatively, if you simultaneously open another project that has a lot of objects, this will also trigger it. So, if you can't replicate the issue, try opening as many large projects as you can.

    Edit: The plot thickens! I was going to try and use 3D Ripper DX to see if I could get more info. But, it only appears to work with 32-bit applications (and only DirectX, C2 is OpenGL ). So, I installed the 32-bit version of Construct 2, and the problem stopped. This bug has a ridiculous list of requirements. Lets see:

    1. Must use Construct 64-bit.

    2. Must have effect previews enabled.

    3. Must have a 9-patch in your layout.

    4. Must have another object in the same layer as the 9-patch, and rendering after it (above in z-order) with a Tint effect.

    5. Must have a lot of objects loaded (texture memory usage?)

    Yeah, I think I'm done looking at this.

  • I not an expert programmer by any means. But, I think it is within the main program itself. It seams to handle larger numbers as floats instead of integers.

    Thanks for the response.

    The transition from 999 to 1000 isn't significant for floating-point numbers, so why would that have anything to do with the problem? The only significant thing that happens is the introduction of the thousands separator, which will be a comma in some regions, and a period in other regions. There appears to be a mismatch between which thousands separator the control uses, and how the application interprets it. You can see this for yourself by typing '100,000' into the box. It will interpret it as 100.

    Alternatively, it may just have an issue with non-digits in the field. Using a period instead doesn't seem to change the result.

  • >

    > > -quote snip-

    > >

    > > It's just weird that I can't use numerical keys in dictionaries. Not a huge deal but I figured it would have been posted somewhere on the forums or in the manual.

    > >

    >

    > Oh, but it is in the manual!

    >

    >

    > > The Dictionary object stores strings and numbers. Each value has an associated key, which is a string.

    > >

    >

    So why does it work when my key is a word but not a number?

    This works: http://n3rd.info/upl/construct2_tokenat_works.png

    This does not: http://n3rd.info/upl/construct2_tokenat2.png

    The values are the same, the keys are the only thing that are different. This is starting to look like a bug now.

    The only 'bug' here is Construct 2 accepting whatever JSON you throw at it. Not only were you using numerical keys instead of string keys, but the values were arrays instead of numbers or strings. Construct 2's debugger is designed to print arrays by turning all of its values into strings and joining them together with commas for separators. While this may look the same as a string value, it isn't.

    Also, keep in mind that a numerical 0 key is very different from a string "0" key, even though they print the same in the debugger. This is likely why the dictionary only allows string keys.

  • -quote snip-

    It's just weird that I can't use numerical keys in dictionaries. Not a huge deal but I figured it would have been posted somewhere on the forums or in the manual.

    Oh, but it is in the manual!

    The Dictionary object stores strings and numbers. Each value has an associated key, which is a string.

  • This sounds like it could be a localization problem. I think you should post your Windows region settings.

    EDIT: It seems to be broken for US English settings too, which was unexpected.

  • -quote snip-

    Somebody else pointed this out also which is strange because when I have a malformed JSON output and try to insert it into an Array it won't accept it. The fact that the Dictionary is accepting it (and the debug shows that the Dictionary is apparently populated correctly) has me confused. I wish there was an up-to-date example for formatting JSON output from remote files since all of the old solutions don't appear to work.

    Remember that Javascript is not a type-safe language, so if there is no run-time check to make sure that the data is valid, then it will "accept" anything. From what I know of Lua (another type-unsafe language), this sort of thing is hard to actually check at run-time, since all Lua tables (or Javascript objects, in this case) are fundamentally dictionaries at their core. Arrays are just Lua tables (or Javascript objects) with numerical keys.

    If you want a fool-proof way of determining how your data needs to be formatted, start with an empty dictionary, and use the 'Add key' action to populate it with a few entries, and then export it to JSON. It's pretty easy to figure out how to edit the JSON text to add new key-value pairs from there.

  • The JSON output by your php script doesn't look like the JSON that is written by the dictionary object. Your JSON looks like this:

    {
    	"c2dictionary":true,
    	"data":[
    		["13","1","KuJoe"],
    		["14","2","TesterBot"],
    		["15","3","Hello"],
    		["16","4","Shadow"],
    		["17","6","Tinner"]
    	]
    }
    [/code:2vxyejde]
    
    Sample of working JSON that I'm using in one of my own projects:
    [code:2vxyejde]
    {
    	"c2dictionary":true,
    	"data":{
    		"100":"Course 1 Entrance",
    		"101":"Course 1-1",
    		"102":"Course 1-2",
    		"103":"Course 1-3",
    		"104":"Course 1-4",
    		"105":"Course 1-5",
    		"106":"Course 1-6",
    		"107":"Course 1-7",
    		"108":"Course 1-8",
    		"109":"Course 1-9",
    		"110":"Course 1-10"
    	}
    }
    [/code:2vxyejde]
    
    I'm not terribly well versed in JSON, but it appears you are using arrays instead of a key-value relationship, like the Dictionary expects.
  • What does Trace.HitFrac return please?

    HitFrac is the percentage of the distance covered by the trace line where the hit took place. So, if I start a trace at (0, 0), ended it at (4, 0), and an object's side was at (2, 0), HitFrac would be 0.5, because the hit was halfway between the start and end points. If the object's side was at (1, 0), the HitFrac would be 0.25, and if the object's side was at (3, 0), HitFrac would be 0.75

  • Your 'Radar' object has it's initial animation set to 'undefined', which not only doesn't exist for that object, but it is also confusing the Construct 2 editor. 'undefined' is likely a 'magic string' used by the project loading process, and if something is 'undefined' it is supposed to mean something bad happened.

  • Johncw87

    I'm not sure I understand you correctly but I will say that I have not modified the plugin at all!

    Should I reinstall C2 ?.

    If you install a release build instead of a beta build, the error message will probably go away, but the error itself may still be there. It would appear that somewhere in your project, you have an object with an invalid property. My guess is that the property would normally be assigned by a combobox, but the saved value doesn't match any of the possible values. Proper investigation of this error would require examining your project xml and layout xml files.

Johncw87's avatar

Johncw87

Member since 21 Feb, 2014

Twitter
Johncw87 has 13 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

18/44
How to earn trophies