Infinitely Scrolling Vertical Background

Get help using Construct 2

Post » Tue Feb 04, 2014 11:32 pm



Hey guys, I'm working on an infinite jumper game, it's going to be amazing. I spend hours learning as much as I can everyday about construct. I want to yield the full potential of this great software. I've tried countless times on efforts of creating an infinitely scrolling vertical background, but I've had no luck since. Please, if anyone knows a way I can successfully produce a an infinitely scrolling vertical background seen in games such as Doodle Jump and Mega Jump, I would truly appreciate it greatly. Thank you for your time, I hope that this post will allow me to gain the knowledge necessary for me to move on to the next step with my game and many others.
B
6
S
1
Posts: 89
Reputation: 619

Post » Wed Feb 05, 2014 12:09 am

The infinite runner example has an infinetely scrolling background.
It's horizontally ofcourse but the basic events are there.
Translate the x-events to y-events and you've got an infinete vertical scrolling background.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Feb 05, 2014 4:19 am

Thank you for the prompt reply, unfortunately I've tried this method, and the tiled background just can't seem to stop moving downwards.
B
6
S
1
Posts: 89
Reputation: 619

Post » Wed Feb 05, 2014 5:44 am

you can also look at the flying along template included with construct 2. Go to new project, and scroll down till you see "Flying Along". It has a horizontally scrolling background, just change the X to Y for the scrolling... or is it change the width to height... I forget but that one should give you a good idea...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Wed Feb 05, 2014 7:26 am

The horizontal background is moving in negative direction on the x-axis, you want it to move in positive direction on the y-axis.

So replace x with y, replace - with + and replace < with >

Trial and error will get you where you want to be..
Most of the time it's better to understand what the events are doing instead of just copying them..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Feb 05, 2014 7:46 pm

Thanks, got it working, went with a different method though. Agreed, but one question to everyone. When using the infinite runner template I made sure everything was the same but corresponding to a y axis. I figured out everything including the background moving up, even though accomplished this a different way I want to know this method as well just so I have the knowledge. So with that being said, these are the problems, the background is moving faster than the player, the background does not repeat it only moves, is this how the infinitely "repeating" background works? Thank you for your time.
B
6
S
1
Posts: 89
Reputation: 619

Post » Fri Feb 21, 2014 7:26 pm

Hey Slicksz - can you post an example of how you solved your version of the vertical scrolling background. I have a game(a backwards infinite jumper if you can call it that) in the works that is giving me a headache because it keeps making a huge gap. I want to implement "background" changes as you progress trough the game but if I can't make it "seamless" or almost seamless it will ruin the experience. Ironically enough when the game "restarts" the layout when the player dies it overlays the background and looks "tolerable".

I've got power ups and power downs moving variables and generating "obstacles" down and working and I'm only missing that one peace so I can move on to developing the rest of the levels.(and increasing the timer for the "level change"). Heck I even got the music and sound to work on mobile just fine and two options of controlls.

Any help is greatly appreciated.
B
47
S
9
G
5
Posts: 281
Reputation: 5,803

Post » Fri Feb 21, 2014 7:52 pm

You can also search the forums/tutorials for infinite jumper/faller as well....
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Sun Mar 23, 2014 6:43 pm

Slicksz wrote:Thanks, got it working, went with a different method though. Agreed, but one question to everyone. When using the infinite runner template I made sure everything was the same but corresponding to a y axis. I figured out everything including the background moving up, even though accomplished this a different way I want to know this method as well just so I have the knowledge. So with that being said, these are the problems, the background is moving faster than the player, the background does not repeat it only moves, is this how the infinitely "repeating" background works? Thank you for your time.



Hi! Would you mind sharing how you solved the vertical scrolling background issue? I have been trying to figure this out for the past couple of days using the above suggested advice and I am not able to get it to work. I am getting pretty frustrated and about to just give up.... I don't want to however so any help would be appreciated. Thanks in advance!
B
6
S
1
G
1
Posts: 4
Reputation: 470

Post » Fri Nov 14, 2014 8:56 am

Hello I'd like to chime in with my solution.

I have a tiled background that is the width of the window and 2x the height of the window. This allows me to start the layout with the bottom of the tiled background flush with the bottom of the window, and the top of the tiled background protruding from the window at the top.

Given the origin of the tiled background is its top left corner, I was able to set a trigger for when its Y >= 0. Make sure you set a second condition of Trigger once while true. With that trigger, give it an action to create an instance of the tiled background, with a Y of negative the height of the tiled background. For instance, my window height is 800, so because my tiled background is double the height, its height is 1600. So in this case I would create the new tiled background with a Y set to -1600. This creates the instance immediately behind the first instance.

Then set the tiled background to destroy itself when its Y >= the window height. So mine destroys whenever its Y >= 800.

And then of course to make it actually move I just do an Every Tick trigger. Every tick I set the tiled backgrounds Y to Tiledbackground.Y + (dt * speed), and you can plug in any integer to replace speed.
B
6
S
1
Posts: 31
Reputation: 703

Next

Return to How do I....?

Who is online

Users browsing this forum: koops and 7 guests