Layer Scrolling Offsets/Breaks Objects Position

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.
  • Before I make a bug report I need to make sure I am not the actual bug here ;)

    The objects in the frame does not appear to sync up with the scrolling as well as the backdrop does when you change the scrolling coefficient and re-position the camera. Basically they offset themselves away as you change the scrolling coefficient and move the camera. It's hard to tell for me if it is working by design or if it's in fact a bug.

    Below is an example that switches the scrolling coefficient whenever you leave the frame to left or right. It's a simplified example of a bug in my game that I cannot solve.

    Control the player with the arrow keys:
    1) Leave the frame to the Left
    2) Leave the frame to the right
    3) Repeat, though already from the first two swaps you should see an offset in the Active Objects positions while the backdrop remain in place while yet scrolling at the correct speed.

    So why do I need this to work?
    In my game I load rooms on the fly, once you leave an area I wipe the entire frame, resize it and dump in the new content including parallax background images. Previously the frame always restarted when loading a new area so the layers always "reset themselves" automatically. Now I have to somehow do that myself or hope that this is actually just a bug. It becomes a bit complex as every room has specific scrolling coefficient per background layer and also a position offset that varies from room to room.

    This isolated example is somewhere to start though...

  • Exiting from the Left you set the X Coefficient of layer 1 to 0.75, exiting from the Right you set it to 0.25... changing it to 0.75 too seems to work... or vice versa both at 0.25

    Edit: ah ok, now I understand wath are you doing... the two diffrent coefficients are wanted

    Edited 2 times, last by 1Ombra1 (March 28, 2018 at 4:45 PM).

  • Yup basically the reason for the two different values in the example is that it's a simplified situation in my game where every room has its own scrolling coefficient value, so it changes a lot. Getting this to work with that is what I am trying to do basically :)

    Please login to see this link. Please login to see this link.
    Freelance Dev | Currently Working on Jarvis | Please login to see this link.

  • Not able to look at your example as I am away from my PC, but keep in mind any positional changes you make to a layer (ie setting the position of a layer with the layer object or otherwise) are always updated at the end of the event loop. So any positional data for that layer (and objects on that layer) is always a frame behind. Just curious if this might be tripping something up in your code.

    Please login to see this link.

  • [MENTION=5383]chrilley[/MENTION]: This looks like a bug to me and I was not able to work around it in your example. The active objects on the parallax layer are severly displaced outside the virtual area (looked into their debugger positions). If you paste the actives as backdrops on frame start btw the backdrops hold their position corretly while the actives bug out. I think I encountered this bug in my project too without nailing the problem down like you did. My menu-minimap is constructed of actives and I scrolled the whole layer - this did not work cuz of this bug and I had to work around it by shifting all actives while the layer remains static.

    Please login to see this link.
    Please login to see this link. | Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Not able to look at your example as I am away from my PC, but keep in mind any positional changes you make to a layer (ie setting the position of a layer with the layer object or otherwise) are always updated at the end of the event loop. So any positional data for that layer (and objects on that layer) is always a frame behind. Just curious if this might be tripping something up in your code.

    That was I was thinking too, but the actives are not actively moved or repositioned and bug out anyway. What you say could be the reason of the bug tho, maybe Fuison does not track active objects positions correctly when changing layer scrolling coefficients and repositionioning the camera at the end of the frame loop.

    edit: I delayed the camera update manually, but that did not fix it...

    Please login to see this link.
    Please login to see this link. | Please login to see this link. | Please login to see this link. | Please login to see this link.

  • @Please login to see this link.: I didn't know layers pushed their settings until the end of a fusion loop, very handy info for the future! I cannot seem to affect the outcome of this issue by moving the camera update event around though. Is there a specific approach to this?

    @Please login to see this link.: Yeah, the difference between how it affects active objects vs backdrops is what makes this really confusing! If it is a bug I have high hopes that it's an easy fix to "simply make actives do what backdrops do". By the way do you handle parallax backgrounds the same way as the minimap? Manually positioning the "background active objects" in relation to the camera coordinates?

    Please login to see this link. Please login to see this link.
    Freelance Dev | Currently Working on Jarvis | Please login to see this link.

  • Julian had the right idea by manually delaying until the next frame. Sadly there is no easy way to move a layer around and get accurate active object coordinates in the same frame. But it sounds like some other issue. :(

    I really hope F3 updates layers in the middle of the frame so we don’t have to do workarounds.

    Please login to see this link.

  • [MENTION=5383]chrilley[/MENTION]: I have no actives on my parallax layers, so I never encountered the bug there.

    Please login to see this link.
    Please login to see this link. | Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Alright, thanks everyone for your input! It's become rather clear it is in fact a bug or at the very least a very strange, inconsistent behavior.
    I've now filed a bug report: Please login to see this link. it also includes an updated example that is a bit less messy to look at to understand the issue.

    I'm sure F3 will have better layer capabilities as this time it's written to be a part of Fusion from the get go compared to previous installments. Very much hoping this is something that can be fixed in F2.5 though. The time I have to spend to remake/workaround another feature is digging deep into what I should really be working on right now. :(

    Please login to see this link. Please login to see this link.
    Freelance Dev | Currently Working on Jarvis | Please login to see this link.

Participate now!

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