Add/Substract effect broken when resizing frame - help

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello, I found a bug with the default add/subtract effect.


    I'm currently making a racing game that takes place at night, so I used the subtract effect to make a small but efficient lighting (and it worked like a charm - screenshots below).
    But then, I had another idea.


    THE IDEA: Make the game adapt/fit to any window resolution without "resizing" itself.

    WHAT I DID: I used the Window Control Object to resize the frame to the current window resolution whenever I press a key (it also resizes all of the other effects (zoom, vignette, etc) to fit the screen).

    THE PROBLEM: When the window is resized, as soon as it changes the frame's resolution (even by only 1 pixel) - making it different from the original size in the frame's properties - the subtract effect breaks and won't work correctly anymore, even when set back to it's original size. Note: all of the other effects still work, it's only the subtract effect.


    Screenshots of the problem:

    Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.

    And here is a video of it: Please login to see this media element.


    WHAT I TRIED: I tried using the add effect instead (same problem). I tried resizing the game window only - not the frame - (that kinda worked but wouldn't do what I wanted and won't work in fullscreen). I even spent hours trying to make my own subtract effect by using the official guide and ChatGPT (it's really complicated and didn't work).

    SOLUTION ?: My only solution as of right now is to make multiple builds of the game with different resolutions, for example one with the standard 1920 x 1080 resolution, another build in 3840 x 2160, etc.


    I would really like to know if there's a solution so there would be only one build that would adapt to any monitor size. I'd be grateful if someone could help me find a solution. Maybe use another similar effect/shader for lighting ? Maybe there's a fix ? Or should I really try to make my own effect ?

    Thank you for reading and for your time. Have a nice day/night ! :)


    (Apologies if I made any mistakes or if you didn't understand something - English isn't my native language)

  • my game isnt doing that and its using a subtract layer and tons of other effects - i can do what you did with window edge, and nothing breaks

    * direct3d 11 / no vsync

    * im not using resize to fill frame

    * im not using window control object either.

  • I have an integer scaling method, using a subapp to run the main game, and the parent app controlling scaling. I wonder if it you could change it to suit you? If you are interested you can find it here:

    punchbird
    November 27, 2021 at 5:59 PM

    The text Blitting engine I have recently expanded greatly, but the scaling is the same. I 'll be uploading the updated blitting engine soon too

  • my game isnt doing that and its using a subtract layer and tons of other effects - i can do what you did with window edge, and nothing breaks

    * direct3d 11 / no vsync

    * im not using resize to fill frame

    * im not using window control object either.

    I tried every setting I could think of but I can't manage to make it work without the Window Control Object... I am also using Direct3D11 without VSync. Did you code something for it to work or is it just like that by default for you ?

    I have an integer scaling method, using a subapp to run the main game, and the parent app controlling scaling. I wonder if it you could change it to suit you? If you are interested you can find it here:

    punchbird
    November 27, 2021 at 5:59 PM

    The text Blitting engine I have recently expanded greatly, but the scaling is the same. I 'll be uploading the updated blitting engine soon too

    Alright, I'm currently looking into it, even though I'm lost as I've never used sub-apps before haha. The text blitting engine seems very interesting for my project too (especially because you can color certain words etc 👀) thank you !

  • just works by default. im not using the window object, maybe try a version without it using a set windows size, and then resize to see if its breaking it.


    *mine isnt resizing to fit tho

    Aaah yes, of course, I can resize the window as much as I want and it won't break anything. However, as soon as I touch the frame size (to resize it to window size so the game displays on the entirety of the window) it breaks.



    I made a small MFA that recreates the issue.

    Please login to see this attachment. -> As you can see, once you resize the window and press CTRL to change the frame size, it makes the subtract effect break (the light gets darker for no reason). I even tried deleting "Active 2" (the active that makes everything dark) to see if it would do anything, and resizing the frame made Active 3 (which is on Layer 2 - layer that has the "subtract" effect) become visible for no reason.
    While making this I noticed resizing the frame made another effect I applied to the whole frame break too - so I might just not do that resize thing afterall. But I think there's still an issue with the subtract effect, so please let me know if there's something I did wrong :)

    Please login to see this attachment. (This is the same MFA with the "Gamma Correction" effect applied to the frame - which seems to break too once you resize the frame)

  • MOKA, i would like to see more about your game!

    sprite stacking ? firefly?

    Hello there ! Sorry for the late reply I forgot to check the forum haha. Anyways, I used sprite stacking for the "3D"ish effect. It's far from perfect, it has flaws but it works ! (And it's optimized, I hope)
    As of right now I'm working on a level editor to make maps, meaning I don't have much to show right now, so I'll show you screenshots of when I was messing around for testing purposes:

    Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.


    perhaps its something that can be fixed...

    I wonder, the 2 effects that breaks when resizing are either applied to the frame or to a layer so...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!