Wrap a titledbackground

0 favourites
  • 10 posts
  • How can I wrap a titled background, so that it can appear to be seamlessly looping and moving as the character moves across the screen. Say, for a fly along type game.

  • Check the examples shipped with C2

    there's an endless runner and an endless flyer one I think.

    Goto New project and select from the list.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Been there, done that. No help. What I'm trying to do is have a 1400 x 80 png image which is essentially the floor of the game, wrap so that it can look like it's just one seamless loop, basically I already added the wrap behavior to the floor of course but what tends to happen is there is a big gap and then it just starts over then a big gap and so on and so forth, any help on how to eliminate that gap?

  • And what is the difference between what you want and the endless runner example?

    if floor 1/2 width create floor at ..

    Well it's all there really..

  • Been there, done that. No help. What I'm trying to do is have a 1400 x 80 png image which is essentially the floor of the game, wrap so that it can look like it's just one seamless loop, basically I already added the wrap behavior to the floor of course but what tends to happen is there is a big gap and then it just starts over then a big gap and so on and so forth, any help on how to eliminate that gap?

    You don't have to use wrap behaviour.Warp behavior wraps things when they move completely out of layout.That's why you are seeing a gap

    Open the endless runner example.You will see that event where there's some Background scrolling.

  • The reason I need it to wrap all the way around without the gap is because my image is a 1400 by 80 image and the image well.. ends at 1400 so I want it to connect back to the start 1400. Since it's one long image it keeps on jerking back into position very noticeably. Okay, I will show you a video and I may not necessarily need to use the wrap behavior, but I need a way to make it not noticeably repeat the image.

  • You can use the way described in the examples.

    You might have to make make the tiledbackground twice it's width in your layout depending on if you are going to use the one or two instances implication.

  • I'm not sure though having a 1400x80 texture is smart though.

    If it is put on a power of two texture before being sent to the cpu/gpu (which it will probably be on some systems) that texture will be 2048x2048 in size.

    Might not be a problem, though, just thinking out loud.

  • Thanks, yeah I was thinking the same thing, well I'll see what happens after I test it out on different platforms.

  • still not working (N)

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