Looping Backgrounds

This forum is currently in read-only mode.
From the Asset Store
For Adventure, Action, Heroes, Sci-fi and Action-RPG games.
  • Ive been trying for a little bit to create a loop of a background, with a number of different results. Is there an optimal way to do this? What I am trying to do is create a moving background that loops the same image from right to left without a lot of stuttering.

  • How big is this image? As long as it's not super huge, you should be able to make it loop with Tiled Background. You could scroll the texture with "Set image offset."

  • On the subject of tiled backgrounds, is there any reason you can't animate one? I have a tiled animation, and it'd be nice to be able to tile it without having many many copies of a single sprite, just for a background image.

  • The image is designed to fill the entire screen (so 1280x1024). How does the offset work? I have tried to use the "move at angle command". Is the offset designed to be used to fix some of the problems with that?

  • That just might work fieari..... Ill give it a shot.

  • The image is designed to fill the entire screen (so 1280x1024). How does the offset work? I have tried to use the "move at angle command". Is the offset designed to be used to fix some of the problems with that?

    If you want a constantly scrolling background, you could set the offset to the Timer value. Like this:

    +Always

    -TiledBackground: Set image offset to Timer / 8, 0

    Changing the value 8 will change the speed; lower numbers scroll faster while higher numbers scroll slowly. Also, dividing the Timer value by negative numbers will make it scroll in the opposite direction.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The image is designed to fill the entire screen (so 1280x1024). How does the offset work?

    It works like this:

    http://willhostforfood.com/files3/17687/scroll.cap

    Until there's an expression for "Get offset" you'll have to use a variable like that.

    On the subject of tiled backgrounds, is there any reason you can't animate one?

    Yes... tiles don't have animation. That's what sprites are for.

  • Thanks alot!

  • Out of curosity, what is the largest size this will support? 256x256??

  • As far as I know it will support any size as long as it fits in your VRAM.

  • Yeah, you just have to be careful about not overloading your graphics card. Or the graphics card of your players .

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