How do I use an animated tiled background?

0 favourites
  • 6 posts
From the Asset Store
40 Seamless textures for tile backgrounds. High resolution 1024x1024!
  • Is it possible to have an animated tiled background? I have a gif and I want it to look like the ground is moving to the left (as if the character is running) and I thought using tiled bg would be the way, but I just realized that they don't have a frame-window. Is it possible to make it animated some other way?

  • Hey!

    As you figured out, there is no way to 'animate' your tiled background.

    (Just save the picture, it's too big..)

    Because I can't post links on the forum, I have screenshotted how I fixed the problem.Basically was happens is when woodFloor1 it's pivot point hits 0x, it spawns back to 640x (Just multiply the screen width.)

    With a bullet behavoir it looks like it's moving, and because the same tiled background (woodFloor2) follows, it looks like it's being animated.

    There is a lot of room for improvement though with this kind of method. For some reason I got sometimes some white gaps between the two. (Maybe add a third backgound, or put the tiled background closer together.

    Hope this helps!

    Patrick

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks

  • patrickscheper so now I noticed what you meant by the gaps you get. Does anyone know a good solution for this? After a while, there's a small gap between the 2 ground-objects and it just gets bigger for every time it moves. Solution, anyone?

  • Solved it by instead of setting the X position to a pixel, I set it to the previous ground + the width of the ground objects. In this case, it was like this:

    Ground -> Set X: Ground2.X + 854

  • A way to limit the gap is to also have wide tiled background than the project's window size.

    Moreover, don't check the left X limit at 0 but TiledBackground.Width * -1

    This way, the second TiledBackground is already on screen, and all you have to do is to set the TiledBackground "out of screen" left to the far right, at the exact X where the current TiledBackground is.

    Example capx

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