Automatic Scrolling Layers

This forum is currently in read-only mode.
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hey,

    One feature it seems Construct is missing right now is the ability to set layers to automatically scroll. I'm developing a scrolling space shooter game, where all the action happens in one still frame, while the background scrolls to give the impression you are flying forwards. There currently seems to be no way to let layers to automatically scroll while the player sprite stays still.

    I've got around this by giving backdrops ball movements and using the wrap behaviour, but as I'm loading in large chunks of backdrop for scrolling, this eats up at lot of VRAM. A feature to set layers to automatically scroll would be really useful!

    Many thanks, Tom

  • Tiled Background objects can scroll their contents using the "Set Image Offset" action. You can make a scrolling starfield pretty easily with that. You can even make a starfield with depth by layering different Tiled BGs and setting their offsets at different rates.

    You have to make sure that your textures are a power of 2 to scroll the offset in a Tiled BG though.

  • How about always scrolling in some direction but setting the gameplay layer scroll rates to 0 so it doesnt go anywhere?

  • Concerning 'Set Image Offset', there doesn't seem to be a way to compare the current offset in the event editor, so I can't make it continuously scroll. Ashley's method works, but there doesn't seem to be any difference in memory usage. I guess this would be the case even in there was an 'infinate scrolling' option. It would still be a nice option to have in the settings though!

    Thanks for the help guys!

    • Tom
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Concerning 'Set Image Offset', there doesn't seem to be a way to compare the current offset in the event editor, so I can't make it continuously scroll.

    You're not trying hard enough . There is always a way.

    http://dl.getdropbox.com/u/529356/starscroll.cap

    You give the tiles a private variable, add to it over time, and set the offset to the value of the variable. It only takes one event.

    Hope this helps

  • Of course! I could even use the built in 'timer' function to continously scroll it. Quite simple, can't believe I didn't think of that. Thanks a lot!

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