Alon's Recent Forum Activity

  • Thanks for the reply, yes I do understand that but how it trigger specifically the SAVE (out of any other events that are before it) still doesn't make any sense to me, BUT! I don't care as long as I can solve the speed issue so it doesn't matter anyway.

    What I need is faster speed (if not as normal as other softwares):

    For example, if you press any key in the fastest possible way in any average Windows Software, you won't get such errors or crashes, right? Yes, I'm guess it's probably because of a different way it works and since I'm not a programmer, I'm not even trying to understand this.

    But THIS is what I'm trying to achieve a normal functioning action and still save it to the undo/redo.

    It is good to understand the the limitation of the Save too often in Construct 3, it seems like I need a good solution to this problem because it can't serve anyone if it's too slow, nobody will wait.. to the next action of whatever they do on a creative software it's not possible to create in slow rate.

    THE QUESTION IS:

    How do I cool it down so the saves won't clash but at least... cool down for few milliseconds?

    And will cool-down be enough to solve it or 50/50 solution? if Construct 3 project just can't handle a normal-speed UNDO/REDO I just failed big time working on my project... which is very sad for me.

    Of course I would like to know the limits of the engine I'm using after all.

    As you can see on the screenshots above: I tried "wait for previous actions to complete" because I thought maybe if it will FINISH the "task" then the undo will be saved without put a specific amount of milliseconds so it won't be RISKY for other machines. and as you understand it this try failed. (I tried to put it BEFORE and AFTER the SaveStep)

    Will "WAIT" action do the job or it will still work differently on every machine and be risky?

    If so... WHERE do I put these to test if it works?

    With all the understanding of slowing saves to slot, What is the most efficient (and SAFE) solution to the current UNDO/REDO system if there is any at all?

    Thanks ahead for the help, I'm very curious about this all thing! :)

  • I run into a weird bug that I cannot understand why it's even happening.

    Describing the issue:

    1. When the mouse cursor is over an instance, when I scroll the mouse wheel UP or DOWN "here and there" everything is fine. on the console (F12) I can see it saves the undo on every scroll:

    2. Scrolling over an instance REAL FAST UP or DOWN will do something strange:

    it opens the "SAVE dialog" emulating the same as I press the button "Btn_Save" which have NOTHING to do with over instance or the mouse wheel at all... Where is that coming from?!

    In this example, I scroll fast over an instance, after few seconds doing that, it creates 2 saves and open the save dialog:

    3. When I scroll over an instance REAL FAST (about the same speed of scrolling a long website) for more than few seconds it saves so many times so the UNDO probably can't handle it and it cause crashing (issue #2)

    Note: The above are ALL THE EVENTS related to Mouse Cursor over an instance while scrolling wheel up/down on my project.

    Everything works fine if I just scroll mouse wheel up/down on other objects than the "Created_Object" instances. I do have other actions for scroll wheel combine with other keyboard buttons but none of these creating the bug I described.

    In order to understand and learn a something, I have some questions:

    1. How in the world, the wheel up/down over an instance even related to the SAVE event?

    2. How do I... BLOCK / IMMUNE from this weird thing to happen? or make it "SAFE" from not happening?

    3. How do I FORCE the Undo function: SaveStep to slow-down or happens less times per action?

    I'm VERY curious about this bug and hopefully I can learn something new, if anyone can please answer my questions above and explain it to me (don't forget I'm a noob... please be gentle).

  • When you restart the layout, at the end of the tick all objects will be destroyed and re-created. "Sprite Load from URL" action takes longer than that.

    Clear the image on start of the layout instead, if required.

    Ohhh I didn't know these facts, Now it works like a charm Thanks Sensei! :)

  • 1. I import PNG image to the BG_user, looks NICE as expected.

    2. I press the tilde key, it will clear the imported PNG from the BG_user frame.

    Simple, and it works smooth. :)

    BUT! when I press the "NEW" button to restart the layout and THEN clear the frame with the same code:

    I get an error on the console (F12) that I cannot understand:

    From my tests the issue is related somehow to the Restart Layout Action.

    Why the action it supposed to do as #2 (above) having errors ?

    This is what I tried before posting in here:

    - I converted the key-press #2 (above) into a function, so I can call it but.. it's just a shortcut after all so I got the same error anyway.

    - If I disable the Restart Layout action (which is the all idea), it works fine!

    - I tried to change the order of the actions, but it didn't make any difference.

    Why does it happen and how can I fix this? (without pasting from BG_User to the Canvas)

    BONUS Note / Question:

    I must mention that I don't know ANOTHER WAY to RESET the layout beside using "Restart Layout" the action. If there is another way to do an absolute RESET to the specific layout (not ALL project) please let me know!

    BTW - I'm using NWjs as my final standalone execute, not actual browser if it makes any difference.

    Thanks ahead for any help!

  • My STUPID mistake wasn't even the order (because I did exactly what you suggested above as one of my tries)

    it was because I should've put the Buttons events OUT of the groups that I enable/disable... ehhh I wish I had a better brain (must upgrade to a newer version!)

    I don't like the way it's placed at the moment (probably will change), but it works:

    OK, now that it works, it must be more efficient that it was as you suggested, the console shows it as it should with the correct logs on clicking the buttons, so far so good!

    COULD IT BE?... I just imported and that RED warnings are gone!

    I'm still playing around with more and more options to see if something else won't work, but on a rough test there are no SCARY red warnings as I had when I imported PNG files BEFORE this organized activation you suggested.

    MY NEXT GOAL! I already made a progress but but it looks not exactly correct so I'll try to solve it as I always do only if I'll still wonder about it, I'll show the result here,but first I'll better try solve this by myself (it's not a bug but a numbers thing I believe)

    Thanks once again sensei dop2000 :)

  • If you decided to go with groups, you don't need the boolean flag!

    "On LoadProjectButton pressed -> NWJS Show open dialog, Activate "Load project" group, Deactivate "Load image" group

    "On LoadImageButton pressed -> NWJS Show open dialog, Deactivate "Load project" group, Activate "Load image" group

    That's it!

    Thanks, it may look MUCH cleaner with this way, now.. to what I did:

    First thing, I followed your suggestion: (unless I didn't got it right from the text)

    1. Click the button

    2. On Open dialog OK

    3. Group Activate (itself)

    4. Group Deactivate (the other one)

    But when I put the activate/deactivate actions AFTER "On open dialog OK" it won't execute the rest of the actions probably because it's disabling it's own group BEFORE the next actions which make sense I guess. (no logs on the console when I click any of the buttons).

    So I tried to put the group actions at the end of each event:

    with the above alternative only Load Project Button works, Import button does not (no log appears on the console as well).

    Both groups starts activated by default, So where.. and in what order do I put these actions?

  • The simplest solution is to put them into two different groups and activate/deactivate them depending on what button was pressed, making sure only one group is activated at a time.

    Now... I did a big mess, I started to setup the boolean and I got confused (it was easier in my mind, until I tried to get it to C3) I understood the idea of: ONLY one group Enabled at a time while disable the other and vice versa.

    So, this is what I did but overall code became less organized than it was and it's confusing me: (blaming myself only)

    And I'm pretty sure I'm not triggering them as I should and that's why nothing is working anymore, here I test the LOAD button first:

    The question is: should I get back to the old version since I didn't have issues (yet) ?

    or am I close to get this right... STUPID MODE: ON (again)

    To be honest, not only I have a feeling I made things even worst now... :|

  • > Yes, I do have 2 "On open dialog OK" but they're separated by different buttons, under different groups (as shown on the images above) I guess that's not enough! :(

    No, that's not enough. The simplest solution is to put them into two different groups and activate/deactivate them depending on what button was pressed, making sure only one group is activated at a time.

    I will try to do that since it's also organized as I like! now it make sense to me what you meant thanks for explaining! :)

    By the way, Save/Load and Undo system will not be able to restore custom images (which you load into sprites or drawing canvas).

    It's good to know, I keep learning more about the limits which is very important.

    I think I can handle without undo it since I always have the option to click a button to clear the canvas so it's no big deal I think, also I don't want to get my software super complicated then it's already.

    I'm planning to keep adding minor cosmetic features once I'll get rid of the current scary bugs.

  • If you're just trying to get something working I'd strongly advise: create a new project and figure it out with the fewest objects and events. Then move it over to your main project.

    That's always a good advice, I've done this for minor features I test and now it's a bit more complex to make new project with all the UNDO/REDO and EXPORT/IMPORT systems and the variables etc.. because it's about 80% of my project but there is no doubt! it is a good way to get cleaner project. if I won't be able to solve anything from the mess I have I'll probably have to do that...

    I also have a feeling that you have two "On open dialog OK" events - one for loading image files, and another for loading save files. They are both triggering and causing havoc. Add some kind of flag to distinguish them, or make one universal event, where process files differently based on file extension.

    Yes, I do have 2 "On open dialog OK" but they're separated by different buttons, under different groups (as shown on the images above) I guess that's not enough! :(

    I mean, I don't see anything strange from loading/saving/exporting on the log, no more than 1 line after I click "OK" from loading or saving at the time.

    But if you're saying it could be an issue, I should go for the most efficient and SAFE way indeed!

    I'm not sure how to do one universal event to separate the files and confused about how to deal with a boolean.. maybe something like when click: "Btn_Load" or "Btn_Save" or "Btn_Export" to toggle the boolean, still confusing to me how this should actually help separating them or solve this.

    But WAIT! it's getting even better:

    I also found out that I cannot UNDO imported images, but I'm not even trying to think about it now as I have to get rid of the SCARY RED warning message first.

    Yeah.. my brain is exploding at the moment I'm going nuts because I thought I finally got some progress killed the early bugs! (panic mode = on)

  • UPDATE:

    After a VERY LUCKY first guess, once I disabled the last action on line 157

    I get no more RED warnings...

    OK, so far it's nice that I got rid of it, I even played around with the software to HOPE! that I didn't damage anything else by disabling this action. (I will keep testing of course)

    The thing is, I have no idea what this action suppose to do, it's from the early version suggested code so can you please explain:

    - What's this action supposed to do?

    - Is it safe to remove it from line 157?

    - Or it will damage something I didn't ran into yet?

    Thanks ahead, and sorry for the mess... the original post was to learn about the limits of Drawing Canvas Object and not focus on bugs, but yeah... things happens.

    UPDATE 2:

    NEVERMIND THAT... can't load and save LOL!

    I'll Keep on the guessing journey :)

  • Thanks for the advice, I appreciate it as always and it's not taking for granted. :)

    Every direction, hint, way helps me to learn and I will keep investigating this and hopefully I'll find something! (I really hope so)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm guessing that message is from your Saving/Loading system or from Undo. It probably has nothing to do with loading an image into sprite. Or maybe you are using "Sprite Set from JSON" instead of "Load image from url".

    I'm just encouraging you to experiment and try solving problems yourself, instead of posting here about every little problem you encounter. You'll learn much quicker.

    You may not believe me but I'm not just jumping on every single issue I have, I'm solving some minor issues (that are for my basic brain-level) one-by-one but some walls I have no clue how to handle or can't see where the issues like these warnings.. total gibberish for me to even understand where to start looking... what I'm saying is "every little problem" for advanced programmer like yourself is usually much bigger for newbies like myself.

    ANYWAYS... Back to TOPIC:

    As always, listening to your advice as you give me the direction what to check in a specific issue instead of me keep guessing for days, as I disabled the "SAVE LOAD - SYSTEM" (group) the scary red warning were gone.

    BTW - Disabling the UNDO/REDO SYSTEM won't change a thing, the the RED warning appears, only the SAVE LOAD - SYSTEM (if it helps).

    That's my Current version of the code, what cause it? it's not that "Load image from url" but maybe something inside? I have no clue! it must be something STUPID that I did or ruined... again :|

    The all Ajax/JSON is still something I have no idea how or what to do with, it's nothing I understand and it seems very complicated how it works inside the parameters with all these options of data and what not.

    My IMPORT - Load PNG (group):

    Thanks ahead for any help! :)

Alon's avatar

Alon

Member since 20 Feb, 2014

None one is following Alon yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies