Alon's Recent Forum Activity

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

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

  • Try Construct 3

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

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

  • Debug mode shows the correct resolution I set that covers the layout, but export gets weird resolution.

    I don't really know how to check it or fix it:

    I thought it's related to the project properties so I play around with the different full screen modes, the best for my case is the letterbox scale because no matter what size the window is, I can see the menus stretch with the same ratio while other modes make a mess with the layout.

    I did found out a BAD thing, the resolution changes as I change the window size... my reason for using the drawing canvas object is to export the PNG with full layout resolution no matter what the window size is or full screen... now I'm very confused with the changes due to window sizes.

    Is there some Action I need to use to LOCK the capture size to be 1:1 as the Drawing Canvas Object size?

    I even tried to change the origin of the Drawing Canvas Object to middle and moved it, but I get the same result.

  • I don't see any "DrawingCanvas paste object" actions in your code. If you are not pasting anything, the saved image will be blank.

    Sorry about that dop2000 since "Drawing Canvas Object" is new to me, I didn't understand how to paste, now that you mentioned it as an ACTION I just got it! thank you! :)

    But now I'm trying to understand how to work with it because my software is based on layers as you can see where I disable and enable layers, but now that you mentioned that it works using PASTE. I'm afraid it won't work the same?

    1. What if I want to include or exclude whatever on a specific layer to be exported (like it was with the system snapshot)

    How can I do that using the Drawing Canvas Object?

    .

    2. as I mentioned before, the resolution is not the Layer's size which I make sure that the Drawing Canvas is EXACTLY the same resolution size (it's actually covering it 1:1 by snap to grid).

    Why the resolution is weird? (I get same resolution on window and full screen if it helps)

    How do I fix that and capture full layout / canvas object resolution? (3840 x 2160)

    Thanks ahead! :)

  • Obviously my code is wrong, but it's a progress, you showed me that "DrawingCanvas.SavedImageURL" which I wondered what to put on the URI section so that's great!

    I get a black colored .PNG file after I click the EXPORT button and get some weird resolution, not the full resolution of the layout which is 3840 x 2160 but this weird resolution: 3360 x 1890 ...

    I don't know about the weird resolution, but I think that the way I put the Drawing Canvas (resized covering the full layout 3840 x 2160) is on a dedicated layer UNDER the instance layer with the objects I want to include is also a part of the issue beside my code.

    I also need the .PNG to be transparent and capture the instances layer above. (that's how the simple snapshot worked and I was happy with).

    Maybe it should be ABOVE every other layer I want to include? I don't know how to tell the Drawing Canvas what layers to include or exclude... it's a guess for me.

  • Now with my example on how to transfer screen snapshots through a sprite into Drawing Canvas, you can try again :)

    .

    Actually, you can probably make an image of the entire layout much easier. Simply set DrawingCanvas size to layout size and paste all objects on it (Created_Objects family or whatever). Then save and download. You don't need to make screen snapshots.

    I will give it a try thanks!

    Actually that's what I did exactly, I made the Drawing Canvas Object to cover the full layout which is the exact resolution of 3840 x 2160 hopefully to grab it in one click!

    I don't know how to paste the "Created_Objects" Family to the canvas but I want it to capture specific layers like I did before with the system snapshot way (before I used the Drawing Canvas Object).

    I hope I'll be able to make it work.

  • Thanks for the quick detailed reply dop2000 I appreciate it! :)

    At the moment I want to focus on export the full layout resolution to PNG so, without making this complicated way like in the example on the C2 file, there is no way to do it with the built-in C3 using "One Click" to capture? like the display snapshot? (but for the full layout resolution)

    I'm asking because I don't know how to translate the Paster example from C2 I did try and gave up on it yesterday after so many guesses of how to translate it to C3 with the drawing canvas object.

  • After few more attempt with the Drawing Canvas Object:

    So I'm trying to replace the built-in system Snapshot with the Canvas Object save image so I can finally capture the FULL LAYOUT RESOLUTION instead of just the current window display.

    I tried to follow the hints on the manual to use "SavedImageURL" but it seems like I cannot use it in the URI to invoke download of the saved PNG the same way it was working on the snapshot version.

    On the screenshot I show the line that I try to replace with "SavedImageURL" but.. I'm stuck since it's probably not how it works, I don't understand how do I invoke my saved image from the canvas.

    The code I'm trying to "upgrade" from system snapshot to Drawing Canvas Save Image:

    This is where I stuck:

    Help please?

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