Alon's Recent Forum Activity

  • You already know how to load an image into a sprite, and you already know how to paste sprite onto a canvas. Why do you need help with this?

    That's True, but it's because of the scary RED warnings I mentioned:

    These warning only appears when I import so I wonder about a more ways if there are any...?

    Ashley dop2000 Thanks ahead :)

  • Thanks for the answers Ashley! it looks like it's very useful for my project. I'm glad it will also be supported by older machines that's great!

    I would like to let my users the option to import .PNG file that will cover the Drawing Canvas Obj (Sprite that will paste) so they can also clear the canvas if they regret, or import something else later.

    I've already done something like that thanks to dop2000's awesome help (with the URI), but I get lots of scary red warnings on the console (F12) when importing which are total gibberish to me and I'm afraid it will cause issues later.

    Any chance for how to do #4 ?

    a sample project file or screenshot that I can replicate to my own project?

    Since you know it best I bet you can help with the most efficient code for this, I'm aware that you're extremely busy but if possible, it will be amazing!

    Thanks ahead :)

  • Hi All,

    I'm messing around with the Drawing Canvas Object and I'm not sure about some "rules" of what can I do or not, or if I shouldn't if it's not recommended or anything so I have some questions:

    1 - Can I use more than one Drawing Canvas Object on my project? (on different layers)

    2 - If the above is safe (crashes/errors) will it be too heavy for older machines? or it's fine?

    3 - Will users with NO dedicated GPU cards (older machines) are still able to use my software with the Drawing Canvas Object? or they will have some issues?

    4 - Using the NWjs, can I IMPORT .PNG image file to specific Drawing Canvas Object? if so, can you share an example code or screenshot please? it will be very helpful!

    I have few more questions about the Drawing Canvas Object but if anyone can help make the above questions clear first I'll appreciate it, and once again, any C3 example or screenshot for example will be very helpful for me to learn how it's done.

    Thanks ahead!

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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?

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