Infinitely Scrolling Vertical Background

0 favourites
  • 11 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • <img src="smileys/smiley1.gif" border="0" align="middle" />

    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. <img src="smileys/smiley20.gif" border="0" align="middle" />

  • 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.

  • Thank you for the prompt reply, unfortunately I've tried this method, and the tiled background just can't seem to stop moving downwards.

  • 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...

  • 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..

  • 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.

  • 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.

  • You can also search the forums/tutorials for infinite jumper/faller as well....

  • 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!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • DoobieDoctor5000 you mean like this

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