How do I scale a background to follow layout size?

0 favourites
  • 4 posts
From the Asset Store
220 Food Sprites in 16x16 pixel size. Perfect for items for a retro style game.
  • I'm using a Tiled Background to load an image from external source. It's all working well except there's seems to be not a single option to scale the image. If I pick an image which is larger than layout's size, the rest will simply cropped out. Is there any option like "Fill" or "Fit" the image to correspond with smaller layout size?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bump, looking if anyone have any ideas.

  • As you can see in the manual article about the TiledBackground object.

    The object is there to display the repetitive texture that has been loaded into it.

    So no, no stretch or fit of the texture, those only happen in the Sprite object.

    A way to "cheat" could be to have the TiledBackground on its own layer. As you know the size of the layout and you know the size of the image loaded in the object once it is loaded (expression ImageWitdth, ImageHeight) you can calculate the ratio of those and set accordingly the Layerscale and TiledBackground size so that it covers the layout and still appears with the correct "scale".

  • As you can see in the manual article about the TiledBackground object.

    The object is there to display the repetitive texture that has been loaded into it.

    So no, no stretch or fit of the texture, those only happen in the Sprite object.

    A way to "cheat" could be to have the TiledBackground on its own layer. As you know the size of the layout and you know the size of the image loaded in the object once it is loaded (expression ImageWitdth, ImageHeight) you can calculate the ratio of those and set accordingly the Layerscale and TiledBackground size so that it covers the layout and still appears with the correct "scale".

    Makes sense, I will try this. Thank you so much!

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