narFsnw's Forum Posts

  • What is the error? Can you copy the error message here or take a screenshot of it?

  • Problem Description

    An object set as global on a layout will create duplicates of itself when revisiting that layout after saving and reloading the game from a different layout.

    Attach a Capx

    [attachment=0:zu1wp9i1][/attachment:zu1wp9i1]

    Description of Capx

    This capx has 2 layouts:

    Layout 1 has 2 buttons for loading and saving.

    Layout 2 has a global object (orange square sprite).

    Steps to Reproduce Bug

    • 1) Launch the game. You'll see Layout A. Counted object = 0.
    • 2) Press Spacebar. You'll be switch to Layout B, and see the orange sprite (global object). Counted object = 1
    • 3) Press Spacebar again. You'll be switch to Layout A. The orange sprite is still present. Counted object = 1
    • 4) Press Save.
    • 5) Close the game and restart it. The orange sprite is gone. Counted object = 0.
    • 6) Press Load. The orange sprite is visible. Counted object = 1.
    • 7) Press Spacebar. You'll be switched to Layout B. Counted object = 2.
    • 8) You can repeat steps # 3 to 7 to create multiple copies of the global object.

    Observed Result

    The orange square global object is duplicated after loading the savefile and revisiting its layout.

    Expected Result

    The orange object is not duplicated after loading the savefile. No new copies of the object gets created.

    Affected Browsers

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

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    Release 195 (64-bit) - Jan 19 2015

  • I think the best solution is a better feature to find/review/refactor across the whole project, so you can easily look up all function events and function calls if you want to rename something.

    Yes! Very much yes! I loooove functions, but it's always a pain when I want to rename them (or change the parameters, but that's a whole different issue)

  • Using global variables doesn't seem to work.

    I created a global variable on a separated event sheet. Then in my event "Function On", I wrote the name of my variable.

    That gave me an error message:

    "Parameter must be constant. This parameter only support a value known in advance (it must not use variables)."

    I tried to change my variable to a constant variable, but it gives me the same error message.

    What am I doing wrong?

  • Interesting. I'll try this in the future and see how it goes.

    I anticipate that it will create a huge number of global variables, which might become annoying when trying to find one of my actual variables in the list, be maybe it won't really be a problem. We'll see how it goes.

    Thanks for the reply!

  • I just updated to r190 and I'm really glad for the auto-completion of function names, animation names, etc.

    That being said, I did some test and I was sad to find out that even when using the auto-completion, the names won't update if we change the name of the original, like it would when changing the name of an object or a variable.

    For example, if I create an object "Box" and later decide to rename it to "crate", the name will correctly update everywhere I use it. But if I create a function called "doSomething" and later decide to rename it to "doSomethingElse", the name won't update in all the places I call that function. I have to manually find and replace all the places I used that function, which is tedious.

    I uses function a lot, since they are so practical, and it would be nice to have a way to easily change the name everywhere.

    Thanks!

  • I dropped a game on my dropbox and it seems the issue doesn't occurs.

    https://dl.dropboxusercontent.com/u/313 ... index.html

    I guess it's a problem with itch.io then?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Anyone with a game online, not on itch.io, that I could try on Safari 7.1?

  • Anyone of you having trouble loading Construct games using the Safari browser on version 7.1?

    All my games currently on itch.io worked fine on Safari 7.0.X. I just updated and now the games get stuck in the initial loading process. A friend, who is also running Safari 7.1 on mac has the same issue. On other browsers (Firefox, Chrome), the games run fine.

    Here's a link to one of my game that has this error:

    http://narf.itch.io/cadeau_noel_2013

    Those of you running Safari 7.1 (the latest version), do you have trouble loading the game?

    Here's the error message that appears in the JS console:

    SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.[/code:20xhjqm0]
    
    I don't know if it's exclusive on Mac. Or maybe it's a trouble with games on itch.io? Any infos?
  • Yeah, of course I know about this method, using events. But I want to know how to do it "manually".

    I'm just curious really. I want to understand why my array is visible in the Objects panel on the first layout but not on the other. It seems to me like the array is somehow "attached" to the first layout.

    I'm also worry about what would happen if the first layout gets deleted. Will the array still be accessible? Since Construct always need at least one instance of an object present in a layout to be able to spawn another instance of that object, how do I create that first instance if it gets deleted?

  • I should add that my first array is not set to Global.

  • I have a layout called LayoutA where I created a new array object called LionArray. The array appears correctly in the "Objects" panel in Construct.

    Now, I have another layout called LayoutB where I want to use the same array object. (not the exact same array, just another instance of that array). But I can't figure out how to put the LionArray into the layout.

    I tried to drag and drop the the LionArray from the list of object in Projects pane, but this turns the cursor into a "forbidden" icon. It works fine for sprites, but not for arrays.

    So how to I create another instance of the array in my layout?

    (Of course, I could use the event "create a new object", but I really want to know if there's a way to do it from the GUI)

    I know it's a very basic question, but I did take time to look on google, in the manual and in the forums. Thanks for you help!

  • I see the same message in my game. From what I see above, it's nothing to worry about.

    Ashley, you said you would look into it, but that was last year. I'm guessing it really wasn't important after all?

    I would be willing to share my capx if you want to take a look.

  • The thing is, as I mentioned, the sprite font have equality bad framerate. The framerate was equivalent (arount 14 and 15) with both the text object and the sprite font.

    Actually, what would be the best way to produce a iOS app if I'm going to refresh a text object or text sprite every tick? I've been looking everywhere yesterday for information about this. Should I use CocoonJS? Should I disable WebGL somewhere so that I don't have this problem? Again, the game I'm doing runs at 60fps in Safari browser, in Web App mode or in CocoonJS's Webview. It only lag when I use "Canvas 2D/WebGL" in CocoonJS Launcher App.

  • Problem Description

    I'm not entirely sure this is a problem with Construct or if it's CocoonJS who's at fault.

    When I preview a project in the CocoonJS App on iOS, the size of the text object affects the performance of the game.

    Basically, if I update a text object every tick based on an incrementing variable, and the text object is fairly small, I get 60 FPS on iPad 4. On the same device, if I make the text box bigger, the framerate drops to 4.

    Only occurs in Canvas/WebGL mode (in CocoonJS I mean) on iOS. Doesn't occurs in webview mode. I haven't tried other devices since I only own an iPad 4.

    I'm using CocoonJS v2.0.0.

    Attach a Capx

    Attached to this post.

    Description of Capx

    Increment a variable by 1 every tick, and display it in a text object.

    Steps to Reproduce Bug

    • Launch the attached capx in Ludei's CocoonJS Laucher app on iOS, using Canvas/WebGL mode
    • Notice the framerate is 60 on iPad 4
    • In Construct, make the text object bigger. About 2-3 time wider and taller should be enough.
    • Launch in CocoonJS again
    • Notice the framerate is now between 4 and 6 on iPad 4.

    Observed Result

    Framerate is really low

    Expected Result

    Framerate should be consistant.

    Affected Browsers

    • CocoonJS Launcher app on iOS in WebGL/Canvas mode. (The webview mode is not affected) (browsers on computer don't look like they are affected)

    Operating System and Service Pack

    Windows 7, latest version.

    Construct 2 Version ID

    r173, 64-bits