HolidayExplanation's Recent Forum Activity

  • Thanks for the reply dop2000! "Wait for previous action" doesn't seem to make a difference there. But, I do get a runtime error which seems to go on forever after the button click.

    I'm correctly passing it binary data. Especially since directly reading it wouldn't work in C3 anymore as this post suggests https://www.construct.net/en/forum/construct-3/how-do-i-8/import-image-sprite-146850

    To quote Ashley:

    Sprite's 'Load image' action takes a URL, not a file path. They're not the same thing. You probably should use the NW.js object to read the file in to a Binary Data object, then load the Binary Data object's URL instead.

    And it does work when simply running a project in development, but doesn't when exported via NWjs.

    Edit:

    I debugged some more and when I use a different binarydata object for loading the image, it fails. Kind of confused at this point now.

  • Hello, I am creating a little mod-creator for my game. I upload an image and load it into a sprite.

    Then with the button I can load the saved image again later. This all works as shown in the GIF, but it doesn't work when the game is exported. Does anyone know why that could be?

    Showcase GIF:

    https://drive.google.com/file/d/1BiBbm2JsdhQF_i62p9eki7GiUn3j8mRU/view?usp=sharing

    Screenshot of project:

    Project file:

    https://drive.google.com/file/d/1dL9feERtI49J2hOKNd5lnKv2pUxiBebk/view?usp=sharing

    Any help is much appreciated!

    Tagged:

  • Yes. Just change the animation before "Load image into sprite" to which you want to set the uploaded image. The uploaded image stays in the animation, then you can normally switch between animations...

    Image of project:

    Project file:

    easyupload.io/tbnu94

    p.s.:

    You can't upload to a specific frame, it always uploads to first frame of Animation AFAIK.

  • Oh strange. Here's a new link easyupload.io/e2pw90

  • This is how you can upload a file with the file chooser and then load it into a sprite.

    I also made the filechooser invisible with css, so you can place it over any other sprite and make it look better...

    file.io/dSnI8DlktTPd

  • You do not have permission to view this post

  • Yup, that was the problem, setting the position to the camera every tick and size to the viewport fixed it. Works like a charm now, is very performant and looks very good. Thank you very much for all the help R0J0hound!

  • Thank you for the examples, they are quite nice! Because I simulate the angles and sizes of shadows to cycles of the Sun(s) and planets, I used the first example because I like the manual control of it.

    DrawingCanvas is way more efficient and less time consuming for this than the method I use. But, I have encountered an issue; it works nice with "Fullscreen mode: off", but since I have layouts up to 1M x 1M, I use scale outer, and this seems to break it - the shadows are in the wrong positions (at an offset).

    Weirdly, what fixes it is zooming out the layout in my case 24% (I have those controls built in) so after that zoom out and further they are in the right positions. Do you know what might cause the wrong positions on scale out mode? I might be doing something wrong too while adjusting it for large layouts.

    Edit (updated your c3p file to show issue):

    drive.google.com/file/d/1yNc1nvCW7_xbjtRdvEowmikwrJYRRMRJ/view

  • Sorry for the late reply. This would be an example matching the one in my project. It's pretty much what I'm trying to accomplish

    https://drive.google.com/file/d/1IeVm846xSOU5uJEtvNOxCwwAj8AbqEjb/view?usp=sharing

    I haven't yet used the drawing canvas so it might as well be the simplest, I don't know. But I also have a lot of effects on the layer, not sure if they work with the canvas? I assume canvas would be more efficient than having clones, especially if objects sine and have animations

  • Wow thank you for those examples R0J0hound!

    I tried with the cloning since I wouldn't know how to even start trying to transform the drawing canvas one with families and sorting. I have tried adjusting it as a family with sorting and after an hour I'm still getting a full white screen, so I sadly don't really understand how this can work with families.

    I had tried having a separate shadow and ball object, and then a separate "Sprite2" for each and putting the ball and shadow inside a family (for sorting purposes), but it just either doesn't seem possible or my knowledge in that is way insufficient. Probably the latter. Still, thank you for the nice examples.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much for the reply R0J0hound!

    Don't think, at least from my understanding, that the canvas can work in my case? It doesn't seem to me different from having a separate layer with all the shadows on it? In my 2.5D project, every shadow is an instance of the Sprite Shadow and gets sorted together with other members like trees, player, rocks of the family by it's origin. So if a tree's Y is bigger than another tree's Y, it will have a greater z-index and thus get drawn above it.

    Do you mean in the second solution "Another idea that would work is a layer ..." that there would be a separate layer for just the shadows again or am I misinterpreting it?

  • I need to create shadows on the same layer as everything else so that I can do z-sorting, but placing them on the same layer makes them overlap like in the first image, which I don't want. I tried masking them but without success.

    What I don't want:

    What I want (this is accomplished with a separate layer with 20% transparency):

    Tagged:

HolidayExplanation's avatar

HolidayExplanation

Member since 27 Sep, 2015

Twitter
HolidayExplanation has 1 followers

Connect with HolidayExplanation

Blogs