Alon's Recent Forum Activity

  • Thanks sensei dop! I'm about to follow your instructions and do that test.

    Before I go deeper to try replicate the problem as you suggested, I've added the "TempArray Set size to 0" at the start of event 185:

    I've start creating MANY objects (but not as much as an actual creation will be) and as I look carefully on the side-screen with the Console, it updates with more sense as you've mentioned!

    The size file became around 107k - So it means that the bug of the disappearing window is related to the file size somehow (still doesn't make sense to me but what do I know).

    Some ugly temporary shapes (before I work on the actual assets)

    The question is... what happens if and when the file will become around 1MB or more? (it can happen as I have layers of many objects to create)

    Is there anything else I can make to reduce the file size?

    or in other words... make sure this bug won't happen again?

  • Oh... I see! so basically the size of the files shouldn't be HUGE even if there are ZILLION of objects on the screen?

    You sure got a point! you know what you're talking about while I can only guess, RESPECT! :)

    OK, so I followed your suggested JSON analyze website, I copy-past the inside of the files.

    I see how it split the sizes from above but as soon as I get inside to explore... beside (number instances) I don't understand anything, I guess analyzing won't help me as a non-programmer it's all numbers that I can't relate or understand... at least I tried.

    .

    Maybe this will make sense, here are 2 files I've SAVED from my software:

    1 - THIS FILE saved STRAIGHT away as soon as the software opens, No Objects created! SIZE = 23kb

    2 - THIS FILE saved AFTER Creating 10 Objects! SIZE = 225kb

    I did NOT use Undo or Redo, or Import or ANY OTHER button, just to help hunting down the issue.

    I wonder what it is that causing the size go HUGE beside extra objects on the screen?

  • Why the save size suddenly goes up from 50KB to over 3MB when you click save? It should be the same size as when saving Undo steps.

    Another weird thing, I noticed that What shows in the console 3MB is NOT the size of the file at the end as I mentioned it was 1MB (or less) for the specific file I saved (as shown on my early post).

    This is not normal, there must be some other event in your project that's causing this.

    As you can see on the screenshot above there are more then few objects on the screen, it make sense that the file will become bigger compare to an empty canvas, right?

    And when the user will put more and more objects on the screen I guess it will get easily to 10-100 MB or MORE because of so many objects on the screen, but I don't know why it is sooo HUGE! it's weird.

    Maybe you also take a snapshot of the screen and load it into Binary data or something like that. 3MB save is A LOT, and it explains why there is a significant delay in displaying the "Save as" dialog.

    As I explained above, I did NOT change a THING from your original system SAVE/LOAD and UNDO/REDO

    On my tests I ONLY click the SAVE button, no export, no nothing... pure clicking SAVE button so why should it even take a snapshot? especially after you helped me separate the LOAD/IMPORT to groups I thought it will make better managing instead of hidden clashes that I can never find.

    YES! it is not just a lot it is HUGE! and that's only for few objects... what will happens when an actual creation FULL of objects on the screen? 200MB file?! this is not normal indeed.

    If you can't figure out why this happens, try to analyze the .alon file, see maybe there is a huge block of data that shouldn't be there, or thousands of small ones.. Try this tool for example:

    https://www.debugbear.com/json-size-analyzer

    Thanks! I will try this and have a look, I'll also try: EMPTY file and File With few Objects created, before I'll update in here.

    One thing I know for sure is that I did not put "No Save" on my menu Buttons (Save, Load, Export, Import, Quit, etc..) it is temporary because I have some issues with the Tween of their panel when not saving them (maybe I'll use containers! thanks to you I just discovered this feature!)

    But when I checked the difference it was about 10k without buttons, that's not the issue.

  • OK! I think I'm on to something, but I'm not sure what it means!

    I think IT IS related somehow to the UNDO/REDO after all (again I DIDN'T TOUCH IT or the SAVE/LOAD since last time).

    TEST #1:

    My latest test was CREATING and cloning more objects UNTIL THE SAVE ISSUE happens:

    When I cannot save, I UNDO few times until I CAN SAVE AGAIN! the window is working...

    TEST #2:

    When I REDUCE the MAX UNDO to 10 (from 64) I can create MANY more objects on the screen without the issue to appear... and it happens again (I didn't eliminate it by reducing MAX Undos)

    I don't even have to use CTRL+Z to undo while creating, it's probably something about how many undo saves it creates in the background, but I still don't understand HOW it's related to the SAVE window?!

    Size of the project file is about 1MB saving and loading VERY fast:

    10 UNDOs is not enough for what I'm trying to achieve it is not enough... 32 still brings the issue back

    Could it be related to MAXIMUM save in a way? if so... why it won't let me save?!

    TEST #3:

    When I load the above project file and add 1 MORE OBJECT (or clone it) the SAVE ISSUE appears immediately, even if I just run on from a fresh C3 Preview (clean NEW project without UNDO's or anything).

    Current Saving System:

    THE (stupid) walk-around:

    Whenever the Saving Window doesn't appear I UNDO (Ctrl+Z) and REDO (Ctrl+Y) and I click the SAVE button and the SAVING WINDOW appears normally and allow me to save...

    Maybe these experimental tests can help hunt down where the issue is and how do I eliminate it?

  • Me again...

    I didn't want to make a new thread because this issue is somehow related to the SAVE that I thought we solved, but it appears in a different situation:

    THIS TIME!

    Starting to make a tiny scene in my software creating few objects, tweaking them, changing size, rotate, etc.. SAVING at first few times works like a charm, I can save, load, import etc..

    So far so good! :)

    .

    BUT THEN!

    I started to "TEST" my software by adding MORE objects and having fun... so much fun that I almost forget I'm TESTING it... the save ISSUE/BUG is back: when I click "SAVE" nothing happens.......

    I didn't expect it because I thought we've already solved this with the mighty help from dop2000!

    Since that change we did with the GROUPS to enable/disable I didn't even touch the Save/Load section.

    .

    TESTING:

    So, the first I did is trying to check out what's up via the Console, and I actually can see that I click and IT IS "TRYING" to save.. but it's waiting for me to save, the PROBLEM IS: there is no SAVING WINDOW so I cannot save, it's like it's not popping up so whenever I click SAVE again it will just requesting another "invisible" saving window that I cannot see (because it doesn't exist) and that's why it's kind of stuck and I can't actually SAVE!

    I also tried testing FEW MORE TIMES (without using UNDO/REDO and with) it doesn't matter, the SAVE is sick.

    Last time it was a random saving related to undos and other mess, this time... it's PURE SAVING issue... (or NW.js issues? I wish I knew).

    When I cannot SAVE I just quit the software and the console give me that SAME warning:

    So it's obviously WAITING for saving but... WHERE IS THE SAVING WINDOW ?

    I didn't see anything strange on C3 Debugger, and it's obviously related to the NW.js "SAVING WINDOW" is not there anymore... but still wants me to SAVE AS and click OK... so it waits, I don't know how to explain it better.

    I'm starting to think it's a NW.js issue because it's like the window is "SOMEWHERE" but in none of my screens waiting for me to save the file and continue creating my stuff.

    .

    Any ideas how can I test it in different ways?

    How do I track down the issue?

    Maybe I need to CHANGE something in the code like to limit the saving ONCE per window appearing or something weird that I can't even think how to do?

    I cannot replicate this to a fresh new project, it must be tested on my current project version because it is most of the code anyway... ANY suggestions are very welcome and appreciated!

    Thanks head!

  • YUP! it was the Containers! :)

    I never used containers before it sounds like a VERY useful tool, like hierarchy child-parenting in compositing I guess (from reading the manuals) but in practice it's the best way to learn.

    I wonder if it's a only C3 feature like Families.

    The Tank example is nice but like most of the manual things are not very clear for example what about changing all values/instance variables to absolute or relative of all contained objects at the same time, or just location, and why not using families if it's grouping others, I have so much more to learn... yeah, I'm confused, I have much more to learn, but never mind that... one by one, unfortunately my brain isn't big enough.

  • lerp is a lot like clamp, you give it a start point, and an end point, and then what percentage of the way between the two it currently is.

    so when the percentage is zero, it will be at the start point, at 100% it will be at the end point, at 50% it will be half way between the two.

    So basically, Clamp: will give 2 points: min - max?

    and Lerp will give 3 points: min, percentage, max?

    I'm not sure if I understand but I was curious.

    that would be a picking issue. each knob has to pick the correct slider before it can be aligned properly.

    I just replicate the same code and the only difference that matters the code is the image I shared above when I disable it, I don't have anything extra to for each or the sliders/knobs beside the same code that's why I can't find the issue.

    This is the only part that affect the weird knobs movement on the Y but I don't know why... or more important I can't find the problem in order to fix it (if I can fix it at all of course).

    It's probably something on my code that I can't relate because as I mentioned on the last post I did search manually and with the Ctrl+F to try find anything related.

  • Thanks AllanR and dop2000 for the great findings and experiments, this is interesting indeed!

    From quick test like I did last time (moving the panel CRAZY FAST) it seems VERY STABLE.

    To be honest a bit confusing as I look at the code with all the new things (especially with that funny word "LERP" that I have no idea what it does or what it does on the code, what's it's purpose or anything about LERP! but it's a funny word... (feel free to explain it to me based on our example if you like).

    .

    2nd thing, I've tried to replicate the latest C3 update file by dop and it's "ALMOST" working, I still couldn't find after trying to find where the problem is after trying to put some browser logs on the LERP sections which I notice happens every tick (keep raising the numbers) but still when clicking the knobs I didn't see any difference.

    I looked on my own code to see where it could be but nothing is related to it from what I looked (beside looking carefully manually) I used the Ctrl+F to search for "Knob" because I'm guessing it is something about it. I also tried to Turn On / Of some lines to see what affect it, and I believe it's related to that LERP thing which I don't understand.

    It seems like it's doing something with the Y position of the above Knob which is strange, but this all code is overwhelming for me anyway, it could be that funny word "LERP" related or the dy instance variable, I don't know for sure

    It could be around this event:

    from my enable/disable testings, if I disable the 1st action on this event (look at the image below), the sliders stay at the same place (not following the panel) BUT! they don't have the "Y" Knobs position issue as shown above.

    What could it be?

    if it's related to the LERP thing I don't understand it so... any suggestions why it may happen on my code? or how should I debug to find the issue?

  • Hi AllanR maybe you can help me out with something I've tried to solve, it supposed to be simple but I can't get it to work right.

    As you can see on this example (from my official WIP project) Whenever I click on an instance I made the menu and all it's related "friends" invisible (couldn't put all in 1 family because different types: Text, Sprite, 9patch) I wish I could make this into one family:

    ANYWAY... I want to make the position of ALL of these to the center of the layout of whatever I'll choose later on.

    So when I set the position for the different types of objects to: LayoutWidth.x /2 LayoutHeight /2 it works... BUT! the only issue I can't solve is the Knobs!

    Since they're also changing position, not only they are all over the place, also they change the actual values because it's based on their position (make sense).

    What I tried to do is to Unpin and Pin back.. but still couldn't make it work right.

    My Question: How do I change the position of the Knobs on the Layout WITHOUT changing their values, and also... make them stay based on their original default PIN position?

    Thanks ahead!

    .

    EDIT:

    I just noticed a really huge problem, I couldn't figure this out, because even if I change the .25 to 0.1 Wait it will never be 100% safe for a fast-user (like me for example) when scrolling things very fast when working.

    I wonder if there is also a different solution to this... Knobs position brings these 2 difficult issues but maybe you have an idea how should I fix these 2 ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you so much for taking the time to make this example I appreciate it a lot AllanR! :)

    I will look a deeper look at the code and the comments (amazing way to learn!)

    I think the way I solved the Panel/Sliders on my other code was by adding a negative "is overlapping" for the family (via mouse click/hold) and no matter what was behind the panel it just ignored it (I didn't use the shield object on one of my experimental versions) I'll have to check it out and see how it works all together.

  • Thanks again AllanR this is very helpful.

    To be honest I think I got the idea of the Clamp a bit better with these examples and descriptions.

    I'm not sure what Lerp is or how to use it and I don't want my brain to get confused so I won't stuck on it at the moment.

    For now I played with dop's version of using Clamp based on Image Points because I find it VERY visual and easy to tweak the more visual (for me) the better I can follow.

    The issue I find now is when I want to attach a Panel so I can PIN (behavior) the Slider + Knob to it but it seems like it's reset it to the origin of the 9patch Panel.

    The tricky part (for me) is to make the Knob follow the Panel EVEN after I tweaked it's value.

    So I don't really know how do I make the Knob follow the Panel consider I'll have more Knobs and Sliders of course, this is why I'm playing around with this tiny example first.

    DOWNLOAD My Tiny Experimental C3 File and have a look.

    Maybe.. I'm close to the solution and I didn't realize it yet but I'm out of ideas.

    Please have a look at the file to see what I mean, Thanks ahead! :)

  • Thanks for the quick Reply! Yes I think that the image points are more dynamic.

    I still need to get the idea how I connect the variables (value / steps) without the visual limit so I can connect them with any other properties for effects and such.

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