Infinite Scroll with tiled background

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

    I wonder, how to do an infinite scroll with a tiled background ? I can do this with a sprite with a for/next loop to random x sprite on the screen. But with a tiled background ?

    I've a cool background for space, but I don't know how to make an infinite scroll with. I tried with the warp behaviour but doesn't work : I want it to stay on the screen. With the warp behaviour, the tiled background has to disappear before warping...

    thx in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is a handy "Set image offset" action for the Tiled Background object. Constantly adding to the X offset would make it scroll horizontally for example. Remember that this (like the Tiled Background object in general) only works well with Power-of-two textures.

  • Yes, but we can't retrieve the y offset. To do that, we have to add for ex Y offset + 2 on each loop.

    But we can't retrieve the current Y offset.

  • Yes, but we can't retrieve the y offset. To do that, we have to add for ex Y offset + 2 on each loop.

    But we can't retrieve the current Y offset.

    I'm not sure what you exactly mean by that. You don't have to use loops for this either.

    Try this for a basic example:

    http://dl.dropbox.com/u/2306601/tbgoff.cap

    The offset is controlled with the private variables of the Tiled Background object.

    Oh, and in case you get an error while trying to open this cap, I'm afraid you'll need a newer version of Construct. In that case just grab 0.99.84.

  • thx

  • I did an infinite scroll for one of my games, whenever an object was on screen (meaning it was about to run out of room), I set a private variable to the current width of the background then set the width of the background to that variable +500 and set the object out to the end of the background so it could do its job again later.

    It was a simple one layout game though and after it had been played, everything was set back to its starting positions. I imagine doing that might be eating up resources though.

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