Wrap a titledbackground

Get help using Construct 2

Post » Thu Feb 20, 2014 4:56 pm

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.
B
6
S
1
Posts: 89
Reputation: 619

Post » Thu Feb 20, 2014 5:00 pm

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.
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Feb 20, 2014 5:40 pm

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?
B
6
S
1
Posts: 89
Reputation: 619

Post » Thu Feb 20, 2014 5:48 pm

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..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Feb 20, 2014 6:02 pm

Slicksz wrote: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.
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Fri Feb 21, 2014 10:57 am

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. http://www.youtube.com/watch?v=kSCgcZjBtAY
B
6
S
1
Posts: 89
Reputation: 619

Post » Fri Feb 21, 2014 11:23 am

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.
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Feb 21, 2014 11:54 am

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.
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Feb 21, 2014 1:38 pm

Thanks, yeah I was thinking the same thing, well I'll see what happens after I test it out on different platforms.
B
6
S
1
Posts: 89
Reputation: 619

Post » Fri Feb 21, 2014 3:35 pm

still not working (N) :oops:
B
6
S
1
Posts: 89
Reputation: 619


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot] and 19 guests