Alon's Forum Posts

  • I know what you mean LOL! but I'm telling you it's not working if I'll drag out and click...

    I don't know how to explain it, let me try:

    Click on your Browser "FILE" and DON'T release, now drag your mouse to another place THEN Release it... it won't execute the button! that's exactly how it works for me, not sure how to explain it better.

    There is no issue with it (yet), it works perfect (not from empty space like you show on the image)

    It's hard to show it on video but this is EXACTLY what I'm doing I'm clicking and then moving aside and releasing the left mouse button:

    I know what you mean, FROM empty space to BUTTON it execute, but it's no issue.

    Should it make issues?? maybe for overlapping the objects if that's what you mean, I'm not sure if I understood but I think you're on an upcoming issue ahead of me! oh no... any suggestions for efficiency beside just CLICK the object?

    because that way it won't let me have the current "effect" of overlapping while holding the mouse button, it will execute immediately.

  • Like I said, you need to disable the Undo system completely and test saving feature. If it works correctly without the Undo, then you will know where to look for the problem.

    And of course, if you are not calling "SaveStep" function, then undo won't work.

    So I don't need to mess with anything like the "Set isUndoSave=false" if I want to shut-it down for who knows what events I'll need to SKIP/IGNORE the undo and bring it back?

    That's where I'm confused, I better won't touch it... but I would like to know if that's it's purpose, Enable/Disable the Undo/Redo system? because if it is, it's pretty useful!

    .

    Try clicking anywhere on an empty space, hold the mouse button, move cursor to your sprite button and release. It will work as if the button was clicked.

    It's not, it was before I added the event that it must be overlapping the button and released.

    So it works exactly like if you'll click and hold on a button on any application then move around to another space and release, it's like canceling or more like decided to NOT click it.

    that's what I tried to show on the animated gif, but it's impossible hehe.

  • Thanks for this important reply dop2000 I believe that I left it there from the old version where I had issues with UNDO/REDO of the Save/Load when it was automatically saving on a loop (It's GONE now!)

    I hope that I won't do stupid UNDO/REDO mistakes, so let me get this straight:

    I ONLY call the function: "SaveStep" on events that I want to include in the UNDO/REDO history.

    Because of that old UNDO bug I'm a bit confused: if I DON'T include "SaveStep" the UNDO/REDO system just won't save anything? is that how the UNDO/REDO system works? so I don't need to touch ANYTHING but the "SaveStep" if I need it? I hope that you can approve this, if not please explain if I'm wrong here, I'm trying to simplify it so I can move on without ruin it.

    .

    To your question with the On Left released, I'm not sure how much I progressed since that screenshot but the main reason is because I designed original buttons based on sprites and got rid of the UGLY built-in buttons.

    So I made it work with modes: "off", "over", "click" (animation with 3 frames) so I have control on the visual and on the actions:

    It's hard to show, but I made it work like most applications: ONLY if I Release the left button while it's OVER a button it will execute the action, it just made more sense to me:

    So far it works perfectly fine from what I've tested, but I still need to solve some overlapping issues of course, not simple as I thought because it's already a mess with other "dragging / dropping" that may clash.

    And now... TO THE NEXT BUG-STORM!!! (I already SAW something on the console and I'm scared) I'll try to cleanup my code first before I'll post anything.

    Once again THANK YOU so much my friend, I'm learning so much from you! :)

  • So after couple of hours messing around with logs, trying to see why the SAVE is not showing the window anymore... I don't see anything weird on the log, it just says what it does by the order.

    The thing is, I found out that if I use any of the UNDO hotkeys: "CTRL+Z" I can save again! but can't see anything unusual based on the current logs.

    The thing is that I don't want to ruin the current UNDO/REDO System since it works fine on everything else beside the SAVE button problem.

    So the BUG is happening after I use the EXPORT button, I can still LOAD project file or IMPORT image.png but I cannot SAVE project.

    So I minimize the bug hunting to the area where it is, could it be something on the order of the last event after EXPORTING the set "isUndoSave" to True? because it supposed to bring the UNDO back to work, which works... but do something to the SAVE.

    EXPORT button:

    SAVE/LOAD buttons: (Load works perfectly fine)

    Any ideas or suggestions I should try to play with?

    Thanks ahead :)

  • Yes, if you see a number increasing to the left of console message, it means that the same message was logged multiple times.

    3-5 repeated debug messages for 1 click doesn't seem right.

    Thanks! this is a good way to track some bugs you sure helped me understanding some debugging issues which I can't really understand on the built-in debugger with it's insane overwhelming information.

    I have no idea why the SAVE button do that after X clicks, it start acting normal when using it few times... I don't know what's the direction to check but I'll do some tests maybe I'll track the issue...

  • Thanks for the reply dop2000 :)

    I hope that that Yellow warning isn't something that may affect other users on different OS: Mac / Linux / Other Windows versions?

    I just reloaded the C3 project and launched it again (I didn't change a thing, it's currently the same as you see on the screenshot) and it works without the 127 issue, only the Yellow warning.

    But I'm not sure if I understand what are these numbers counting on the console, does it mean what I guessed on my last post? the number of how many times the line runs? (endless counting / every tick) or this number is related to something else?

    OK, So the 127 line endless counting thing is gone. (I'm not sure why)

    And I kept trying clicking the "SAVE" button, wait a sec.. Cancel the window browser menu, and save again.. few times (not fast, I didn't want to flood or anything).

    I tried to emulate a user in-session when saving more than once while working.

    And the thing is that after few times, on every ONE SINGLE CLICK on the SAVE... I see 3, 4, 5 or MORE on the number of the side.

    Does it mean that it saving more than ONCE ?

    Hunting the bugs won't be easy but if I'll understand what to look for I may be able to eliminate some of them.

  • Disable or remove Undo system completely. Add different "Browser Log" debug messages in all events where you are saving or which may trigger the save. Try to find why the game is saved so many times, there is something in your code that's doing it.

    Thanks for the tips dop2000 I appreciate it!

    Since I want to understand how to HUNT the bugs by using the console via your instructions, I've added different "Browser Logs" (I even included these words to get my EYES! hehe) at the end of the different lines under SAVE / LOAD (same group) as you can see on the screenshot.

    I just got started so I didn't do all the tests, but I wanted to understand something on the console and maybe if I'll understand it, I'll be able to get an idea what's up with my messy project.

    After I put these browsing log notes:

    As soon as I preview (F5) C3 and (12) for its console, I see a YELLOW line with an error and on the bottom these numbers are going up like crazy! (never stopping) something I wouldn't notice without the logs:

    I have no idea what's the YELLOW'ish error message is all about, I'm using a typical PC / Windows 10 and no special device.

    MY (very noob) QUESTION:

    Is that normal? or does it mean that it's on a neverending loop and I need to solve this (maybe by making a sub-event with "Trigger Once while true" to put them inside to make it work?

    OR

    If it's perfectly normal and it should run the endless numbers (emulating every tick I guess..) is that normal should I ignore it and move on?

    I'm asking because I don't want to skip any tiny bug and do my best to fix'em all one by one.

    Thanks ahead for any help! :)

  • I don't know if I actually hit it 94 times, but as I explained I did hit SAVE once, canceled (using Esc or the Cancel button) many times one after one... not fast at all, to see if the problem is with the SAVE, because using Load or Export didn't make this issue.

    it's not that I'm flooding the SAVE button, but it's a GOOD to know that saving more than once is not recommended at the moment which is really weird!

    Even with the Undo/System disabled it keep saving zillion times, like it's ignoring the Cancel SAVE and keep saving another copy and another one.

    I noticed an error on the F12 console when I click the IMPORT button, it works fine, it imports an image fine but why it gives this error:

    This is my current IMPORT code:

    TOTAL MESS:

    So one thing I did notice, after IMPORT or EXPORT I cannot SAVE anymore... what a mess, it's more ruined than I thought! (I don't have any errors on export)

    It shows that I did SAVE but again, the original issue is there: No saving window appears not on other windows, not on taskbar manager nowhere... so it's a NW.js / browser issue probably!

    and when I quit my software, the console warning popup window:

    if I tried to save twice for example, so unstable that it's scary!

    Beside that weird RED error for the import which is bad by itself...

    Is there a way to LIMIT the SAVE to "ONLY ONCE" when clicking it?

  • It's probably not related, but why do you set IsUndoSave to true in event 124? Remove this action.

    Press F12 and open browser console when fps drops and you have problems with saving, see if there are any errors in the console log. Or maybe you'll see that your game is saved many times per second..

    Thanks for the tip dop2000 I think you've found the issue! :)

    First I got rid of that action as you suggested (that wasn't the issue).

    Second thing I did with the F12 running on the other screen, and one time after another I clicked the "SAVE" button, then canceled (or ESC) to get out of it, then Clicked again, Esc, clicked Esc... until it STOPPED showing the Saving File Browsing window!

    I didn't notice anything unusual on my Windows System (not even CPU or RAM change) BUT! as soon as I Exit the current Run (F5 Preview from Construct 3) I got the message that says:

    94 downloads are in progress. Do you want to cancel the downloads and exit NW.js?>

    which make sense, I did press lots of save and cancel... so I thought it should CANCEL or (eliminate) the save window, which probably is still out there "waiting" BTW there are no popup windows out there waiting for me to save... when I clicked cancel, every window closed itself so this is very weird because where are these 94 saving windows hiding? (Not on any of my screens, not even shown on the taskbar process)

    This is what you've suspected! too many saves that didn't actually CANCELED when I click cancel or ESC.

    SOLUTION?

    What is the most efficient way to LIMIT only 1 save at a time? I guess disable or unfocus buttons won't do the job very well.

    What event / action should I add to accomplish this?

  • Hi All,

    I found a bug in my big project and I tried to solve it:

    I can Save few time, and it will open the system-browse window so I can choose where to save and what file name I like to change or use the default, but it works only for FEW times!

    When it stops working (ignoring the action) whenever I save via button OR keyboard (it doesn't matter) Saving won't open the System-Browse Window. I must mention that Loading and other options works fine, it's only the problem with "SAVE" on my project.

    While using the DeBug Preview I noticed that once "SAVE" gets ignore the FPS drop down from 130 FPS to 2 FPS for a moment, than it gets back (other actions such as export / import / load doesn't affect the FPS and keep functioning with no issues. Maybe someone can SEE the issue on my code:

    If I insist trying to "SAVE" more and more... the software crashes, as well Constuct 3.

    I hope that this information helps finding my bug.

    In my original code I use: Press "Btn_Save" | On clicked so I thought maybe it's an unfocus issue, so I changed it to "Ctrl+S" but the issue is still there after saving few times, that means it's nothing to do with the button code.

    Any help will be appreciated, Thanks ahead! :)

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My setup is pretty much mid-low like most people with Full-HD (for each display) but I would love to make it work for lower resolution (old machines) if possible for PC, Mac, Linux users as well.

    I found it very unstable, after exporting few times and keep tweaking (dragging and stuff) when trying to SAVE file (nothing to do with the export) it's either crashes or stuck... so I'm starting to think maybe it will be best to give up on the Drawing Canvas Object even if I'll limit it to 1920x1080, I'm afraid I'll only have issues with the way it renders, Also I think it will require GPU from users but I'm not sure.

    Unlike the example I put here earlier, my software uses 1920x1080 as the display / camera that pan around, zoom in and out, but it can render the all layout (for now) as 3840x2160 which is what I wanted, that way I give my users more space around... but it's not stable and crashes so maybe it's not the best solution after all.

    All I know is that it's not stable at the moment, even on my minimal test projects and I can't blame my hardware since my current machine is is mid-low / average :

    CPU: Intel i7 | 32GB RAM | GPU: GeForce 980 4GB | HD: SSD | OS: Windows 10

    Once I'll get to finish most of the features on my software, obviously I'll test it on lower machines and other OS.

    For now, if something is not working well on my machine or make things slow/stuck... it's a warning for me to try something else to keep the software as light as possible.

    Maybe I'm wasting my time on this but at least it's a good practice for learning so I'm happy about it.

  • Update:

    I may found a temporary (still limited but working) solution, so I thought why not sharing.

    If I limit or should I say FORCE my users to use Full Screen (no window) when using my software, the Drawing Canvas Object allow me to export the full size of the layout!

    For example in my current test, My Display Properties (native screen resolution) is 1920x1080

    But still I managed to export the FULL 4K 3840x2160 resolution of the full layout!

    There are some issues I have with enable/disable after cleaning the canvas but for now it works.

    It is not the best solution but I played so much with it consider I'm a noob and I could force the resolution I want to export to the PNG. so it's kind of nice but still not how I wanted it to work by forcing my users to use ONLY full screen.

  • I don't know what you mean by "paste one layout to another layout" and I doubt it will work.

    Drawing Canvas size is not equal to its snapshot resolution. And the snapshot resolution depends on current window size (not layout size!), pixel density and god knows what else.

    I mean if the Drawing Canvas Object is not on the same layout that I create my objects, but on a dedicated own layout and when clicking the Export button to PAST all these instances to the Drawing Canvas Object on that other layout, create the PNG file, then go back to the first layout (creating).

    But it doesn't really matter if it's up to the Window size only.

    Is it possible to change the window size before capturing before exporting to get a HUGE window (even if the user have native resolution of 1920x1080 resolution? and bring it back to the original size when finished creating the PNG file?

    or it will make a total mess for the user, windows will move around other places and for users with multiple screens the window will even change position?

    Forgive me, I'm just out of ideas... it seem like it's impossible to do in C3 and I've learn that asking for new features or tools that are needed is pointless since I'll get the same answer anyway: "the dev team is small" they got better things to do than listen to noob users, I get it. and also "this feature is already built-in just do [insert very complicated programmers terms instructions here] to do it, it's easy!" which is not for people like myself who use C3 based on their original motto "for non-programmers" ...

    Anyway thanks for the help, I do appreciate it I'm just sad that I'll have to use the very limited system snapshot and the users will get really weird image resolutions based on their window size or their screen resolution.

  • Thanks for the explanation dop2000 I read it few times and like many things on the manual I didn't find an example or hint for what I'm trying to do since there is no explanation how to capture 100% layout resolution 1:1 ratio so this is much harder for me to solve by myself.

    I understand that it's not going to be simple compare to the system snapshot feature which is: Click = Capture, DONE! but limited to "what you see is what you get" only.

    IDEA:

    I know I should try it first, but based on your explanation which is much more specific to what I try to do and it's great! I had another "logical" idea in my head, it may sound stupid but I wonder what do you think about it and if it's even possible to do in C3.

    WHAT IF:

    1 - I'll create a NEW dedicated EMPTY layout with 3840 x 2160 resolution.

    2 - The Drawing Canvas Object will cover the all layout (same resolution).

    3 - If this option is possible: PASTE the current layout to the other NEW EMPTY Layout?

    4 - When file is created, back to the first layout (where I create and edit my objects).

    Again, I didn't test it because as many other things it's nice "on the paper" but I have no idea how to accomplish this on C3 since it's much more complicated and confusing.

    So I'm just wondering about your opinion, do you think this is a good idea or not even worst trying?

    Any other solutions for this tricky solution are most welcome!

    Please share a working code or visual screenshot that shows how to capture full layout resolution (no matter what window size is or if it's on full screen).

    Thanks ahead! :)

  • I really don't know. I would suggest making a blank project with 3840 x 2160 DrawingCanvas, trying to paste some sample sprite on it, save and download. If the result image size is smaller, log it as a bug.

    Also, try changing project scaling mode and see if it affects exported image size.

    Great Advice dop2000 I just made a clean C3 Test file dedicated to this issue.

    I still don't understand why the Exported Resolution is NOT equal to the full Drawing Canvas Object resolution which is exactly the same as the Layout, Both: 3840 x 2160 (4K) as you can see on the file.

    Different Tests I tried on this file:

    1 - I tried the different project's properties fullscreen mode, Letterbox scale is the best for showing everything while window is changed, also none of the modes FIXED the issue, it was always a WEIRD resolution.

    2 - When I have no Background (before I added the Background Layer) the export was always 1920x1080 which is my current display resolution, once I added the Background layer with TiledBackground to cover the full layout 3840x2160 I get a weird resolution on export... strange consider everything is exactly the same resolution? (Drawing Canvas Object, Layout, TileBackground = 3840x2160)

    3 - I also tried to change the origin of the drawing canvas to the Center and I re-position it in the middle of the Layout to cover everything perfect, it didn't change anything on export so I undo that to the default origin Top-Left corner position.

    I didn't add Camera (zoom in/out) or many extra layers like in my official project to keep it as clean as possible to try tracking down the issue and hopefully understand how to fix it.

    THE GOAL:

    No matter what the Window Size or if it's Full Screen, ALWAYS: Export PNG to Layout's Full Resolution!

    HAVE A LOOK:

    File is Attached, if anyone can please explain how to make it work, PLEASE explain or share the new fixed C3 project or a screenshot of the code (easier for noobs like me to follow).

    Drawing Canvas - TEST (c3 project file)

    Thanks ahead for anyone who can help!