Alon's Forum Posts

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

  • Try Construct 3

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

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

  • Thanks for your advice Noah. I'm learning as I go, it's a really good practice no doubt.

    To be honest, since yesterday I'm still trying to "upgrade" my current canvas snapshot into... my goal which is: capturing the full layout resolution instead of the current window size unfortunately without luck it's much more complicated to my level.

    If I'll have no choice, I'll probably have to limit my users to capture WYSIWYG (What You See Is What You Get) which is the current working feature on my project.

    Maybe if there is a C3 Plugin/Addon or work-around that can help me capture full resolution of the layout in more simple steps or ease of use (compare to the built-in options that are not for my level of understanding) I'll be happy for anyone can recommend me so I'll have a look and give it a try, instead of give up on another useful feature for my software.

    Thanks ahead for any help! :)

  • Alon Yes, you just need to use Drawing Canvas (C3) instead of Paster (C2)

    Thanks for the reply Noah. since I'm a noob, I don't even know how to access the Drawing Canvas, is it a built-in or object, and more important how do I actually program such thing, sorry for the confusion.

    Any example files, screenshots or anything visual that can help will be very appreciated.

    Thanks ahead! :)

  • Thanks for sharing dop2000 :)

    So there is no similar way to do this on C3 ?

    I do have C2 but it means I'll need to build all my project from scratch..

  • > All I need is to CLEAR it or REMOVE or UNLOAD from that specific frame and not just the option to replace with another, it is very important in my project that it can get back to empty frame

    This doesn't make sense. You first say that you don't want to replace it, but then you say you want to go back to an empty frame, which means replacing it with a transparent image.

    Why it doesn't make sense?

    It's simple I don't want to destroy the sprite or to replace the sprite All I want is to replace it's first frame with the image that will be LOAD into this specific animation frame, in this specific sprite.

    As I said, I have the first animation frame which is empty, I want to replace it with the loaded one.

    But I want the option to UNLOAD(or clear) the ALREADY LOADED IMAGE from the specific first animation frame with a click of a button, and making the user to replace it with a different image.

    So it is using the exact same sprite as holder, same animation, same frame.

    I'm sure that there are other options, that's the beauty about programming many solutions.

    BUT I have no clue about these options (as I said I'm not a programmer, I don't understand these terms, I'm still learning) so I try to use what I understand best.

    I'm not exactly familiar with how to control or work with the canvas and I already have other issues with layout/window/fullscreen sizes (other thread..) so this is why I just want the most obvious solution for me to load / unload replacing a specific frame for specific animation on a specific sprite. because that's the only option I currently understand. because it make more sense to me with my current limited logic, sorry for not being as smart as most of the people here, I'm not a programmer THIS is why I'm using C3 and not other tools, Logic is the only thing I can follow.

    The hard time I get is to find that feature you said is already in Construct 3 so I don't need to ask for such feature... since it's already exist, but WHERE?! can you please show in a screenshot? it will be very helpful for me to try and replicate it instead of keep searching that unload image action you said before that is already built-in and I can't find.

    If this is going no where I'm sorry for the trouble.. we're both wasting much time understanding each other obviously at least on this subject, I'll just use that confusing URI way for now, at least it works. but thanks anyway I do appreciate you're trying to help Ashley. :)

  • There already is a built-in way to unload an image, which I just described. I don't see why you can't just use that. If you want to revert to some default image, just destroy the sprite, unload it, then put some stock image in its place with a different sprite object. If it's already easily doable, why does there need to be any new feature to cover it? As a small team with limited resources, thousands of bug reports and hundreds of other feature requests, suggestions would have to need a really good reason to motivate them, and I don't see why the existing feature doesn't cover what you want here. Don't jump straight to a feature request before properly considering the alternatives... or if the engine actually fully supports that already!

    I think you don't understand exactly what I'm trying to do because of my bad English so I can't blame you or anyone for that but only myself, believe me I'm trying hard as I can to be clear.

    Also I'm not against you Ashley or Scirra team, I'm terribly sorry if it sounds like that... I'm here with MUCH LOVE and good vibes only! :)

    My sprite is already on the layout on a specific size, I don't want to destroy it.

    It's first frame is empty, this is where the LOADED image will be placed (from my understanding).

    All I need is to CLEAR it or REMOVE or UNLOAD from that specific frame and not just the option to replace with another, it is very important in my project that it can get back to empty frame since there are Layers behind it with built-in backgrounds that needs to be seen and change viability is not a solution for what I'm looking for.

    And my point again, what you described may be helpful... maybe even the solution, but I didn't understand even where that UNLOAD IMAGE action you said is already built-in because I couldn't find it.

    Thanks to dop2000 (you rocks!) I just used the very long characters under the URI section and it did the job for my solution, all I'm saying is... instead of that URI mystery (for a non-programmers like myself) I wish I could find that "UNLOAD IMAGE FROM SPRITE" action that I still can't find... maybe it's hidden somewhere obvious that I missed, but since you're saying it is already built in C3 so I'm still looking maybe I'll find it under a different object and not under the related sprite object.

  • I'm giving my users the option to load and if they want to unload that image to a specific sprite, so they can still see the layers behind (built-in background that will come with the software) that's the reason I need to unload an image without destroying the sprite who holds it.

    The memory was something I was worried about but not the main issue and you explained it's not a big deal so that's good news for my purpose. :)

    Still, this unload image procedure is something very complicated for any non-programmer to find or even understand unlike other simple actions in C3. I hope that you'll consider to add more simple action to unload an image with just a few clicks like some other actions in C3.

    OFF-TOPIC:

    As I mentioned before, this is a good example of why I'm not bothering to suggest ideas/features or improvements to C3 anymore.

    Dear Ashley I'm not here to complain, but I hope that one day you'll look from the non-programmers / beginners eyes who like in my case: A low-level C3 user who still cannot understand many programming terms that for others are obvious.

    Taking for granted that EVERYONE knows basic programming terms is not very inviting or encouraging.

    What I'm saying is that in order to accomplish some tasks in C3 I'm looking for the "Human-Like" terms which are very friendly logical way of things which is the main reason why I like C3 for the most part.

    But to be honest many simple things such as unloading an image from a sprite... could be done with just another action on for ease of use for us... none-programmers to understand, and there are many other things that could be simplify.

    Thanks to this amazing forums I found different solutions to different issues :)

    It's the best way for me to learn as I'm working on an actual project but still considering... I'm not a programmer, my brain have it's limits (a gentle way to say: "I'm not smart as you guys")

    I'm just an animator with a basic logical-thinking who originally migrate from "Clickteam's Fusion" to Construct 3 and fall in love! :)

    Sorry about my bad English and for the off-topic, I felt like sharing my opinions.

  • Hi All,

    On my current code, the only way I can export PNG is by using the browser's Snapshot feature.

    The problem is that it's acting like: "What you see on screen, is what you get".

    and also: "The current size of the window resolution is what you get".

    My project's full layout size is: 3840 x 2160

    the layout starts with viewport size of: 1920 x 1080 the user can zoom in/out, exporting takes a snapshot of what's seen on the screen based on the current window size.

    if I'm NOT on full screen mode it will capture a smaller resolution based on the size of the window.

    The PROBLEM is:

    If I want to capture and export (not sure if I should call it snapshot) .PNG of the FULL SIZE of my layout and NOT based on what you see is what you get, even if the window is tiny or full screen to CAPTURE the full size of the layout is what I'm trying to do.

    What I want to achieve is:

    to CAPTURE the full layout size 3840 x 2160 resolution no matter what the current size of the window, the camera position or zoom is. just to CAPTURE a full layout resolution to .PNG file!

    Can somebody PLEASE explain how to do this?

    Any screenshots of such code or step-by-step will be very helpful for me to follow as I'm still a noob and I'm guessing that it's not that simple to achieve.

    Thanks ahead!

    Tagged:

  • Any true programmer knows this short combination of characters by heart!

    Others (like me) can google something like "URI smallest image" and copy-paste it from stackoverflow.

    As a non-programmer I have no clue what is URI, so I would never even search for it.

    when I did search for unload image on the official C3 manual, I didn't get what I was looking for.

    The reason I sucked into C3 is because their motto was that it's for non-programmers... like myself.

    And if there are so many ready-do-use actions with few clicks, I don't see any reason why this and other actions are so hard to get. and I already know if I'll suggest this or other features, I'll get an answer that will cancel my argument anyway, so I don't bother suggesting officially, it's just to make a point as a user. :)

    But don't get me wrong, the FORUMS, this community is amazing especially thanks to people like yourself dop2000 and I'm grateful for this.

  • Load an empty image, URI: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="

    Or destroy/recreate the sprite.

    Or load an image from another empty sprite.

    Thank you so much dop2000 it works great!

    I'm not even trying to understand how would I guess this "very short" combination of characters...

    just to get to unload an image.

    Shouldn't we have an "UNLOAD Image" option, thinking about noobs like myself... this is a scary line. :)