Wrap to behavior problem

0 favourites
  • 10 posts
  • I tried to make a seamless background with the "Wrap to" behavior .

    I made 2 background sprites with the same size as the layout, so that if the first is of screen, the second is visible and the other way around.

    The problem is, it does not wrap correctly.

    Here is a link to a video:


  • So, noone?

  • The same thing happens if i set X of the background sprite in front of the layout if it left it.

    Same result if i use a Keypress to move the sprite of mouse input.



  • So, noone?

    something tell me that wrap isn't the best option for make parallax scroll backgrounds..

    take a look on this

  • > So, noone?


    something tell me that wrap isn't the best option for make parallax scroll backgrounds..

    take a look on this

    Yeah, but the funny thing is, i tested booth and had the same problem.

    In my last post i didnt used the Wrap to behavior.

  • If you want a scrolling effect that appears to have parallax on different layers, do it the second way without the wrap behavior, but don't actually add parallax to those layers; just have them scroll at different speeds but all still be on (100, 100) parallax

    So like while right arrow is down, have back01 move forward at 10 pixels/second, and have back02 move forward at only 5 pixels/second

    Also, the manual entry about delta time and framerate independence definitely comes into play here, so I'd look into that as well

  • The sprites are all on the same layer and have speed. There is always a gap or an overlap.

    As i said, i tried the "wrap to" behavior and setting the X of the sprite (as soon as the sprite leaves the screen).

    I tried moving them with keyboard and mouse input and even with the bullet behavior. Same results. O.o

    I will look into the framerate independence, its the only thing that o could think of.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • okay, it has to be a bug.

    I tried everything and always have the same gaps and overlaps (in my Browser and NW.js).

    I even used an old "infinite background scrolling" tutorial (that uses dt) and had the same resultes.

    I think i reinstall Construct and try again.

  • If the object origin is at the center you can do warping with two events:

    sprite: x < -self.width/2

    --- sprite: set x to self.x+640+self.width

    sprite: x > 640+self.width/2

    --- sprite: set x to self.x-640-self.width

  • It even did not work with that method.

    BUT it was some kind of bug. I reinstalled it and it works like a charm....

    Sorry guys, i feel so stupid. ^^

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)