[SOLVED]vertical scrolling on a single tall sprite images

0 favourites
  • 10 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hi guys,

    Need another help, i have searched on the different threads listed in the forum about having background scroller.

    I managed to do something like this which i believe will work with a bigger sprite but i have an issue.

    we.tl/cdgg9SJazu

    My player cannot move out of the initial play area, if there anyway to free up the play area scrolling upwards but yet not having the player going out of bounds?

  • Just to add on, i know there's a lot of tuts about having tiled background but i'm not looking into that but as a single large tall sprite as a background scrolling upwards

  • if you look at the "space blaster" that comes with C2 (and I am assuming you are already working from this ?) you will see that the layout size is set to 1024, 5120 and the player starts at the bottom of this area.

    you can just move the background down and leave the player still to give the impression of moving upwards...

  • I believe it's this part RamPackWobble

    But it doesnt work, this time the background doesn't scroll or move. In the cap file it states for player set Y viewportbottom("Game") and there's a game subfolder in the capx file but mine doesn't as the free version doesn't allow creation of sub folders.

    Could that be the problem?

    I have attached the new capx file for viewing

    we.tl/xCJ2gZpDC6

  • The reason it has stopped scrolling is that you have disabled the scroll y (every tick - "line 1") - do you see the line through them ?

    I think these two lines above are to limit the player to the visible screen area.

  • Hihi,

    Initially the first line was there Every Tick > System Set scroll Y to scroll.Y -8 *dt and the background did move upwards which is ok.

    The problem was that my player and sprites cannot move up the background, if you enable the lines and try moving the player upwards then you will noticed that the player can't move upwards. Its like the whole project is moving upwards, not only the background.

  • Just an update to this thread, i'm currently looking and searching for other ways to do this. Most of the tutorials here are for parallax scrolling, so not really much about vertical ones.

    Maybe if we can find a way to solve this we can have this under a tutorial also.

    PS: I just tried having giving the background the bullet behavior and have it move slow but end up the background starts to move out of the screen instead lol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi all,

    I have solved this issue. Thanks to the youtube tutorial here by ArcadEd -----> youtube.com/watch

    In that tutorial, the example shown is for tiled background but the events works if you going to have a single tall sprite like what i'm trying to do. My event here is as below

    My background sprite for now is not that big as its currently just a placeholder so the timer to wait for 30 secs is the estimate time for the sprite to travel at the gamespeed of 25 before it goes out of screen.

    So after 30 seconds, set bulletspeed to 0 and stop the travel.

    Thanks all who contributed and viewed and also to ArcadEd for your videos.

  • well I am late to the game, here you go anyway...

    https://db.tt/8BAmCY1l

  • hihi RamPackWobble

    No worries man, thanks for your capx file. I can always refer to it on how is your's being done.

    Thanks for your help dude

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